diff --git a/README.md b/README.md
index 25edcd9a74..876a5b01ff 100644
--- a/README.md
+++ b/README.md
@@ -6,10 +6,68 @@
Babylon is a JavaScript parser used in Babel .
+ - ES6 enabled by default.
+ - Comment attachment.
+ - Support for JSX and Flow.
+ - Support for experimental language proposals.
+
## Credits
Heavily based on [acorn](https://github.com/marijnh/acorn) and [acorn-jsx](https://github.com/RReverser/acorn-jsx),
thanks to the awesome work of [@RReverser](https://github.com/RReverser) and [@marijnh](https://github.com/marijnh).
-Significant diversions are expected to occur in the future such as streaming, EBNF definitions, sweet.js integration,
-interspacial parsing, comment attachment and more.
+Significant diversions are expected to occur in the future such as streaming, EBNF definitions, sweet.js integration, interspacial parsing and more.
+
+## API
+
+### `babylon.parse(code, [options])`
+
+## Options
+
+- **allowImportExportEverywhere**: By default, `import` and `export`
+ declarations can only appear at a program's top level. Setting this
+ option to `true` allows them anywhere where a statement is allowed.
+
+- **allowReturnOutsideFunction**: By default, a return statement at
+ the top level raises an error. Set this to `true` to accept such
+ code.
+
+- **allowSuperOutsideMethod** TODO
+
+- **sourceType**: Indicate the mode the code should be parsed in. Can be
+ either `"script"` or `"module"`.
+
+- **plugins**: Array containing the plugins that you want to enable.
+
+### Example
+
+```javascript
+require("babylon").parse("code", {
+ // parse in strict mode and allow module declarations
+ sourceType: "module",
+
+ features: [
+ // enable experimental async functions
+ "asyncFunctions",
+
+ // enable jsx and flow syntax
+ "jsx",
+ "flow"
+ ]
+});
+```
+
+### Plugins
+
+ - `jsx`
+ - `flow`
+ - `asyncFunctions`
+ - `classConstructorCall`
+ - `doExpressions`
+ - `trailingFunctionCommas`
+ - `objectRestSpread`
+ - `decorators`
+ - `classProperties`
+ - `exportExtensions`
+ - `exponentiationOperator`
+ - `asyncGenerators`
diff --git a/bin/babylon.js b/bin/babylon.js
new file mode 100755
index 0000000000..ddda000631
--- /dev/null
+++ b/bin/babylon.js
@@ -0,0 +1,15 @@
+#!/usr/bin/env node
+
+var babylon = require("../lib/index");
+var fs = require("fs");
+
+var filename = process.argv[2];
+if (!filename) {
+ console.error("no filename specified");
+ process.exit(0);
+}
+
+var file = fs.readFileSync(filename, "utf8");
+var ast = babylon.parse(file);
+
+console.log(JSON.stringify(ast, null, " "));
diff --git a/package.json b/package.json
index bf1543b1a4..da4a2899a2 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,16 @@
{
"name": "babylon",
- "version": "5.8.29",
- "description": "",
+ "version": "6.0.2",
+ "description": "A JavaScript parser",
"author": "Sebastian McKenzie ",
"homepage": "https://babeljs.io/",
"license": "MIT",
"repository": "babel/babel",
- "main": "lib/index.js"
+ "main": "lib/index.js",
+ "dependencies": {
+ "babel-runtime": "^6.0.2"
+ },
+ "bin": {
+ "babylon": "./bin/babylon.js"
+ }
}
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 694c4e4838..b01a0b1197 100755
--- a/src/index.js
+++ b/src/index.js
@@ -1,3 +1,5 @@
+/* @flow */
+
import Parser, { plugins } from "./parser";
import "./parser/util";
import "./parser/statement";
diff --git a/src/options.js b/src/options.js
index 5c5d6d50f1..7beddde5ad 100755
--- a/src/options.js
+++ b/src/options.js
@@ -1,29 +1,28 @@
+/* @flow */
+
// A second optional argument can be given to further configure
// the parser process. These options are recognized:
export const defaultOptions = {
// Source type ("script" or "module") for different semantics
sourceType: "script",
- // By default, reserved words are not enforced. Disable
- // `allowReserved` to enforce them. When this option has the
- // value "never", reserved words and keywords can also not be
- // used as property names.
- allowReserved: true,
// When enabled, a return at the top level is not considered an
// error.
allowReturnOutsideFunction: false,
// When enabled, import/export statements are not constrained to
// appearing at the top of the program.
allowImportExportEverywhere: false,
- plugins: {},
- // Babel-specific options
- features: {},
- strictMode: null
+ // TODO
+ allowSuperOutsideMethod: false,
+ // An array of plugins to enable
+ plugins: [],
+ // TODO
+ strictMode: null,
};
// Interpret and default an options object
-export function getOptions(opts) {
+export function getOptions(opts?: Object): Object {
let options = {};
for (let key in defaultOptions) {
options[key] = opts && key in opts ? opts[key] : defaultOptions[key];
diff --git a/src/parser/comments.js b/src/parser/comments.js
index 39aa197872..344ba7e2c0 100644
--- a/src/parser/comments.js
+++ b/src/parser/comments.js
@@ -1,3 +1,5 @@
+/* @flow */
+
/**
* Based on the comment attachment algorithm used in espree and estraverse.
*
@@ -38,9 +40,9 @@ pp.addComment = function (comment) {
pp.processComment = function (node) {
if (node.type === "Program" && node.body.length > 0) return;
- var stack = this.state.commentStack;
+ let stack = this.state.commentStack;
- var lastChild, trailingComments, i;
+ let lastChild, trailingComments, i;
if (this.state.trailingComments.length > 0) {
// If the first comment in trailingComments comes after the
@@ -60,7 +62,7 @@ pp.processComment = function (node) {
this.state.trailingComments.length = 0;
}
} else {
- var lastInStack = last(stack);
+ let lastInStack = last(stack);
if (stack.length > 0 && lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
trailingComments = lastInStack.trailingComments;
lastInStack.trailingComments = null;
@@ -78,7 +80,7 @@ pp.processComment = function (node) {
node.leadingComments = lastChild.leadingComments;
lastChild.leadingComments = null;
} else {
- // A leading comment for an anonymous class had been stolen by its first MethodDefinition,
+ // A leading comment for an anonymous class had been stolen by its first ClassMethod,
// so this takes back the leading comment.
// See also: https://github.com/eslint/espree/issues/158
for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
diff --git a/src/parser/expression.js b/src/parser/expression.js
index 5faf80afce..b27bf3abd2 100644
--- a/src/parser/expression.js
+++ b/src/parser/expression.js
@@ -1,3 +1,5 @@
+/* @flow */
+
// A recursive descent parser operates by defining functions for all
// syntactic elements, and recursively calling those, each function
// advancing the input stream and returning an AST node. Precedence
@@ -28,17 +30,25 @@ const pp = Parser.prototype;
// strict mode, init properties are also not allowed to be repeated.
pp.checkPropClash = function (prop, propHash) {
- if (prop.computed || prop.method || prop.shorthand) return;
+ if (prop.computed || prop.method) return;
- let key = prop.key, name;
+ let key = prop.key;
+ let name;
switch (key.type) {
- case "Identifier": name = key.name; break;
- case "Literal": name = String(key.value); break;
- default: return;
+ case "Identifier":
+ name = key.name;
+ break;
+
+ case "StringLiteral":
+ case "NumberLiteral":
+ name = String(key.value);
+ break;
+
+ default:
+ return;
}
- let kind = prop.kind;
- if (name === "__proto__" && kind === "init") {
+ if (name === "__proto__" && prop.kind === "init") {
if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property");
propHash.proto = true;
}
@@ -101,7 +111,7 @@ pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) {
node.left = this.match(tt.eq) ? this.toAssignable(left) : left;
refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
this.checkLVal(left);
- if (left.parenthesizedExpression) {
+ if (left.extra && left.extra.parenthesized) {
let errorMsg;
if (left.type === "ObjectPattern") {
errorMsg = "`({a}) = 0` use `({a} = 0)`";
@@ -186,7 +196,7 @@ pp.parseMaybeUnary = function (refShorthandDefaultPos) {
if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start);
if (update) {
this.checkLVal(node.argument);
- } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") {
+ } else if (this.state.strict && node.operator === "delete" && node.argument.type === "Identifier") {
this.raise(node.start, "Deleting local variable in strict mode");
}
return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
@@ -215,11 +225,11 @@ pp.parseExprSubscripts = function (refShorthandDefaultPos) {
if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
return expr;
} else {
- return this.parseSubscripts(expr, startPos, startLoc);
+ return this.parseSubscripts(expr, startPos, startLoc);
}
};
-pp.parseSubscripts = function(base, startPos, startLoc, noCalls) {
+pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {
for (;;) {
if (!noCalls && this.eat(tt.doubleColon)) {
let node = this.startNodeAt(startPos, startLoc);
@@ -229,7 +239,7 @@ pp.parseSubscripts = function(base, startPos, startLoc, noCalls) {
} else if (this.eat(tt.dot)) {
let node = this.startNodeAt(startPos, startLoc);
node.object = base;
- node.property = this.parseIdent(true);
+ node.property = this.parseIdentifier(true);
node.computed = false;
base = this.finishNode(node, "MemberExpression");
} else if (this.eat(tt.bracketL)) {
@@ -245,11 +255,11 @@ pp.parseSubscripts = function(base, startPos, startLoc, noCalls) {
let node = this.startNodeAt(startPos, startLoc);
node.callee = base;
- node.arguments = this.parseExprList(tt.parenR, this.options.features["es7.trailingFunctionCommas"]);
+ node.arguments = this.parseCallExpressionArguments(tt.parenR, this.hasPlugin("trailingFunctionCommas"), possibleAsync);
base = this.finishNode(node, "CallExpression");
- if (possibleAsync && (this.match(tt.colon) || this.match(tt.arrow))) {
- base = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
+ if (possibleAsync && this.shouldParseAsyncArrow()) {
+ return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
} else {
this.toReferencedList(node.arguments);
}
@@ -264,8 +274,40 @@ pp.parseSubscripts = function(base, startPos, startLoc, noCalls) {
}
};
+pp.parseCallExpressionArguments = function (close, allowTrailingComma, possibleAsyncArrow) {
+ let innerParenStart;
+
+ let elts = [], first = true;
+ while (!this.eat(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(tt.comma);
+ if (allowTrailingComma && this.eat(close)) break;
+ }
+
+ // we need to make sure that if this is an async arrow functions, that we don't allow inner parens inside the params
+ if (this.match(tt.parenL) && !innerParenStart) {
+ innerParenStart = this.state.start;
+ }
+
+ elts.push(this.parseExprListItem());
+ }
+
+ // we found an async arrow function so let's not allow any inner parens
+ if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) {
+ this.unexpected();
+ }
+
+ return elts;
+};
+
+pp.shouldParseAsyncArrow = function () {
+ return this.match(tt.arrow);
+};
+
pp.parseAsyncArrowFromCallExpression = function (node, call) {
- if (!this.options.features["es7.asyncFunctions"]) this.unexpected();
+ if (!this.hasPlugin("asyncFunctions")) this.unexpected();
this.expect(tt.arrow);
return this.parseArrowExpression(node, call.arguments, true);
};
@@ -286,45 +328,46 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
let node, canBeArrow = this.state.potentialArrowAt === this.state.start;
switch (this.state.type) {
case tt._super:
- if (!this.state.inFunction)
+ if (!this.state.inMethod && !this.options.allowSuperOutsideMethod) {
this.raise(this.state.start, "'super' outside of function or class");
- case tt._this:
- let type = this.match(tt._this) ? "ThisExpression" : "Super";
+ }
+
node = this.startNode();
this.next();
- return this.finishNode(node, type);
+ if (!this.match(tt.parenL) && !this.match(tt.bracketL) && !this.match(tt.dot)) {
+ this.unexpected();
+ }
+ if (this.match(tt.parenL) && this.state.inMethod !== "constructor" && !this.options.allowSuperOutsideMethod) {
+ this.raise(node.start, "super() outside of class constructor");
+ }
+ return this.finishNode(node, "Super");
+
+ case tt._this:
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, "ThisExpression");
case tt._yield:
if (this.state.inGenerator) this.unexpected();
- case tt._do:
- if (this.options.features["es7.doExpressions"]) {
- let node = this.startNode();
- this.next();
- var oldInFunction = this.state.inFunction;
- var oldLabels = this.state.labels;
- this.state.labels = [];
- this.state.inFunction = false;
- node.body = this.parseBlock();
- this.state.inFunction = oldInFunction;
- this.state.labels = oldLabels;
- return this.finishNode(node, "DoExpression");
- }
-
case tt.name:
node = this.startNode();
- let id = this.parseIdent(true);
+ let allowAwait = this.hasPlugin("asyncFunctions") && this.state.value === "await" && this.state.inAsync;
+ let allowYield = this.shouldAllowYieldIdentifier();
+ let id = this.parseIdentifier(allowAwait || allowYield);
- if (this.options.features["es7.asyncFunctions"]) {
+ if (this.hasPlugin("asyncFunctions")) {
if (id.name === "await") {
- if (this.inAsync) return this.parseAwait(node);
+ if (this.state.inAsync || this.inModule) {
+ return this.parseAwait(node);
+ }
} else if (id.name === "async" && this.match(tt._function) && !this.canInsertSemicolon()) {
this.next();
return this.parseFunction(node, false, false, true);
} else if (canBeArrow && id.name === "async" && this.match(tt.name)) {
- var params = [this.parseIdent()];
+ let params = [this.parseIdentifier()];
this.expect(tt.arrow);
- // var foo = bar => {};
+ // let foo = bar => {};
return this.parseArrowExpression(node, params, true);
}
}
@@ -335,21 +378,43 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
return id;
+ case tt._do:
+ if (this.hasPlugin("doExpressions")) {
+ let node = this.startNode();
+ this.next();
+ let oldInFunction = this.state.inFunction;
+ let oldLabels = this.state.labels;
+ this.state.labels = [];
+ this.state.inFunction = false;
+ node.body = this.parseBlock(false, true);
+ this.state.inFunction = oldInFunction;
+ this.state.labels = oldLabels;
+ return this.finishNode(node, "DoExpression");
+ }
+
case tt.regexp:
let value = this.state.value;
- node = this.parseLiteral(value.value);
- node.regex = {pattern: value.pattern, flags: value.flags};
+ node = this.parseLiteral(value.value, "RegexLiteral");
+ node.pattern = value.pattern;
+ node.flags = value.flags;
return node;
- case tt.num: case tt.string:
- return this.parseLiteral(this.state.value);
+ case tt.num:
+ return this.parseLiteral(this.state.value, "NumberLiteral");
- case tt._null: case tt._true: case tt._false:
+ case tt.string:
+ return this.parseLiteral(this.state.value, "StringLiteral");
+
+ case tt._null:
node = this.startNode();
- node.rawValue = node.value = this.match(tt._null) ? null : this.match(tt._true);
- node.raw = this.state.type.keyword;
this.next();
- return this.finishNode(node, "Literal");
+ return this.finishNode(node, "NullLiteral");
+
+ case tt._true: case tt._false:
+ node = this.startNode();
+ node.value = this.match(tt._true);
+ this.next();
+ return this.finishNode(node, "BooleanLiteral");
case tt.parenL:
return this.parseParenAndDistinguishExpression(null, null, canBeArrow);
@@ -357,10 +422,6 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
case tt.bracketL:
node = this.startNode();
this.next();
- // check whether this is array comprehension or regular array
- if (this.options.features["es7.comprehensions"] && this.match(tt._for)) {
- return this.parseComprehension(node, false);
- }
node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos);
this.toReferencedList(node.elements);
return this.finishNode(node, "ArrayExpression");
@@ -403,12 +464,13 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
}
};
-pp.parseLiteral = function (value) {
+pp.parseLiteral = function (value, type) {
let node = this.startNode();
- node.rawValue = node.value = value;
- node.raw = this.input.slice(this.state.start, this.state.end);
+ this.addExtra(node, "rawValue", value);
+ this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
+ node.value = value;
this.next();
- return this.finishNode(node, "Literal");
+ return this.finishNode(node, type);
};
pp.parseParenExpression = function () {
@@ -424,19 +486,15 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow
let val;
this.next();
- if (this.options.features["es7.comprehensions"] && this.match(tt._for)) {
- return this.parseComprehension(this.startNodeAt(startPos, startLoc), true);
- }
-
let innerStartPos = this.state.start, innerStartLoc = this.state.startLoc;
let exprList = [], first = true;
- let refShorthandDefaultPos = {start: 0}, spreadStart, innerParenStart, optionalCommaStart;
+ let refShorthandDefaultPos = { start: 0 }, spreadStart, innerParenStart, optionalCommaStart;
while (!this.match(tt.parenR)) {
if (first) {
first = false;
} else {
this.expect(tt.comma);
- if (this.match(tt.parenR) && this.options.features["es7.trailingFunctionCommas"]) {
+ if (this.match(tt.parenR) && this.hasPlugin("trailingFunctionCommas")) {
optionalCommaStart = this.state.start;
break;
}
@@ -454,6 +512,7 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow
exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem));
}
}
+
let innerEndPos = this.state.start;
let innerEndLoc = this.state.startLoc;
this.expect(tt.parenR);
@@ -482,8 +541,7 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow
} else {
val = exprList[0];
}
-
- val.parenthesizedExpression = true;
+ this.addExtra(val, "parenthesized", true);
return val;
};
@@ -497,11 +555,11 @@ pp.parseParenItem = function (node) {
pp.parseNew = function () {
let node = this.startNode();
- let meta = this.parseIdent(true);
+ let meta = this.parseIdentifier(true);
if (this.eat(tt.dot)) {
node.meta = meta;
- node.property = this.parseIdent(true);
+ node.property = this.parseIdentifier(true);
if (node.property.name !== "target") {
this.raise(node.property.start, "The only valid meta property for new is new.target");
@@ -513,7 +571,7 @@ pp.parseNew = function () {
node.callee = this.parseNoCallExpr();
if (this.eat(tt.parenL)) {
- node.arguments = this.parseExprList(tt.parenR, this.options.features["es7.trailingFunctionCommas"]);
+ node.arguments = this.parseExprList(tt.parenR, this.hasPlugin("trailingFunctionCommas"));
this.toReferencedList(node.arguments);
} else {
node.arguments = [];
@@ -554,10 +612,14 @@ pp.parseTemplate = function () {
// Parse an object literal or binding pattern.
pp.parseObj = function (isPattern, refShorthandDefaultPos) {
- let node = this.startNode(), first = true, propHash = Object.create(null);
- node.properties = [];
let decorators = [];
+ let propHash = Object.create(null);
+ let first = true;
+ let node = this.startNode();
+
+ node.properties = [];
this.next();
+
while (!this.eat(tt.braceR)) {
if (first) {
first = false;
@@ -575,24 +637,30 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) {
prop.decorators = decorators;
decorators = [];
}
- if (this.options.features["es7.objectRestSpread"] && this.match(tt.ellipsis)) {
+
+ if (this.hasPlugin("objectRestSpread") && this.match(tt.ellipsis)) {
prop = this.parseSpread();
- prop.type = "SpreadProperty";
+ prop.type = isPattern ? "RestProperty" : "SpreadProperty";
node.properties.push(prop);
continue;
}
+
prop.method = false;
prop.shorthand = false;
+
if (isPattern || refShorthandDefaultPos) {
startPos = this.state.start;
startLoc = this.state.startLoc;
}
+
if (!isPattern) {
isGenerator = this.eat(tt.star);
}
- if (!isPattern && this.options.features["es7.asyncFunctions"] && this.isContextual("async")) {
+
+ if (!isPattern && this.hasPlugin("asyncFunctions") && this.isContextual("async")) {
if (isGenerator) this.unexpected();
- var asyncId = this.parseIdent();
+
+ let asyncId = this.parseIdentifier();
if (this.match(tt.colon) || this.match(tt.parenL) || this.match(tt.braceR)) {
prop.key = asyncId;
} else {
@@ -602,57 +670,78 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) {
} else {
this.parsePropertyName(prop);
}
+
this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos);
this.checkPropClash(prop, propHash);
- node.properties.push(this.finishNode(prop, "Property"));
+
+ if (prop.shorthand) {
+ this.addExtra(prop, "shorthand", true);
+ }
+
+ node.properties.push(prop);
}
+
if (decorators.length) {
this.raise(this.state.start, "You have trailing decorators with no property");
}
+
return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
};
pp.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos) {
if (this.eat(tt.colon)) {
prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);
- prop.kind = "init";
- } else if (this.match(tt.parenL)) {
+ return this.finishNode(prop, "ObjectProperty");
+ }
+
+ if (this.match(tt.parenL)) {
if (isPattern) this.unexpected();
- prop.kind = "init";
+ prop.kind = "method";
prop.method = true;
- prop.value = this.parseMethod(isGenerator, isAsync);
- } else if (!prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (!this.match(tt.comma) && !this.match(tt.braceR))) {
+ this.parseMethod(prop, isGenerator, isAsync);
+ return this.finishNode(prop, "ObjectMethod");
+ }
+
+ if (!prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (!this.match(tt.comma) && !this.match(tt.braceR))) {
if (isGenerator || isAsync || isPattern) this.unexpected();
prop.kind = prop.key.name;
this.parsePropertyName(prop);
- prop.value = this.parseMethod(false);
+ this.parseMethod(prop, false);
let paramCount = prop.kind === "get" ? 0 : 1;
- if (prop.value.params.length !== paramCount) {
- let start = prop.value.start;
- if (prop.kind === "get")
+ if (prop.params.length !== paramCount) {
+ let start = prop.start;
+ if (prop.kind === "get") {
this.raise(start, "getter should have no params");
- else
+ } else {
this.raise(start, "setter should have exactly one param");
+ }
}
- } else if (!prop.computed && prop.key.type === "Identifier") {
- prop.kind = "init";
+ return this.finishNode(prop, "ObjectMethod");
+ }
+
+ if (!prop.computed && prop.key.type === "Identifier") {
if (isPattern) {
- if (this.isKeyword(prop.key.name) ||
- (this.strict && (reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name))) ||
- (!this.options.allowReserved && this.isReservedWord(prop.key.name)))
- this.raise(prop.key.start, "Binding " + prop.key.name);
+ let illegalBinding = this.isKeyword(prop.key.name);
+ if (!illegalBinding && this.state.strict) {
+ illegalBinding = reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name);
+ }
+ if (illegalBinding) {
+ this.raise(prop.key.start, "Binding " + prop.key.name);
+ }
prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
} else if (this.match(tt.eq) && refShorthandDefaultPos) {
- if (!refShorthandDefaultPos.start)
+ if (!refShorthandDefaultPos.start) {
refShorthandDefaultPos.start = this.state.start;
+ }
prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
} else {
prop.value = prop.key.__clone();
}
prop.shorthand = true;
- } else {
- this.unexpected();
+ return this.finishNode(prop, "ObjectProperty");
}
+
+ this.unexpected();
};
pp.parsePropertyName = function (prop) {
@@ -663,7 +752,7 @@ pp.parsePropertyName = function (prop) {
return prop.key;
} else {
prop.computed = false;
- return prop.key = (this.match(tt.num) || this.match(tt.string)) ? this.parseExprAtom() : this.parseIdent(true);
+ return prop.key = (this.match(tt.num) || this.match(tt.string)) ? this.parseExprAtom() : this.parseIdentifier(true);
}
};
@@ -673,21 +762,23 @@ pp.initFunction = function (node, isAsync) {
node.id = null;
node.generator = false;
node.expression = false;
- if (this.options.features["es7.asyncFunctions"]) {
+ if (this.hasPlugin("asyncFunctions")) {
node.async = !!isAsync;
}
};
// Parse object or class method.
-pp.parseMethod = function (isGenerator, isAsync) {
- let node = this.startNode();
+pp.parseMethod = function (node, isGenerator, isAsync) {
+ let oldInMethod = this.state.inMethod;
+ this.state.inMethod = node.kind || true;
this.initFunction(node, isAsync);
this.expect(tt.parenL);
- node.params = this.parseBindingList(tt.parenR, false, this.options.features["es7.trailingFunctionCommas"]);
+ node.params = this.parseBindingList(tt.parenR, false, this.hasPlugin("trailingFunctionCommas"));
node.generator = isGenerator;
this.parseFunctionBody(node);
- return this.finishNode(node, "FunctionExpression");
+ this.state.inMethod = oldInMethod;
+ return node;
};
// Parse arrow function expression with given parameters.
@@ -704,8 +795,8 @@ pp.parseArrowExpression = function (node, params, isAsync) {
pp.parseFunctionBody = function (node, allowExpression) {
let isExpression = allowExpression && !this.match(tt.braceL);
- var oldInAsync = this.inAsync;
- this.inAsync = node.async;
+ let oldInAsync = this.state.inAsync;
+ this.state.inAsync = node.async;
if (isExpression) {
node.body = this.parseMaybeAssign();
node.expression = true;
@@ -718,21 +809,46 @@ pp.parseFunctionBody = function (node, allowExpression) {
node.expression = false;
this.state.inFunction = oldInFunc; this.state.inGenerator = oldInGen; this.state.labels = oldLabels;
}
- this.inAsync = oldInAsync;
+ this.state.inAsync = oldInAsync;
// If this is a strict mode function, verify that argument names
// are not repeated, and it does not try to bind the words `eval`
// or `arguments`.
- if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) {
- let nameHash = Object.create(null), oldStrict = this.strict;
- this.strict = true;
+ let checkLVal = this.state.strict;
+ let checkLValStrict = false;
+ let isStrict = false;
+
+ // arrow function
+ if (allowExpression) checkLVal = true;
+
+ // normal function
+ if (!isExpression && node.body.directives.length) {
+ for (let directive of (node.body.directives: Array)) {
+ if (directive.value.value === "use strict") {
+ isStrict = true;
+ checkLVal = true;
+ checkLValStrict = true;
+ break;
+ }
+ }
+ }
+
+ //
+ if (isStrict && node.id && node.id.type === "Identifier" && node.id.name === "yield") {
+ this.raise(node.id.start, "Binding yield in strict mode");
+ }
+
+ if (checkLVal) {
+ let nameHash = Object.create(null);
+ let oldStrict = this.state.strict;
+ if (checkLValStrict) this.state.strict = true;
if (node.id) {
this.checkLVal(node.id, true);
}
- for (let param of (node.params: Array)) {
+ for (let param of (node.params: Array)) {
this.checkLVal(param, true, nameHash);
}
- this.strict = oldStrict;
+ this.state.strict = oldStrict;
}
};
@@ -773,19 +889,25 @@ pp.parseExprListItem = function (allowEmpty, refShorthandDefaultPos) {
// when parsing properties), it will also convert keywords into
// identifiers.
-pp.parseIdent = function (liberal) {
+pp.parseIdentifier = function (liberal) {
let node = this.startNode();
+
if (this.match(tt.name)) {
- if (!liberal &&
- ((!this.options.allowReserved && this.isReservedWord(this.state.value)) ||
- (this.strict && reservedWords.strict(this.state.value))))
+ if (!liberal && this.state.strict && reservedWords.strict(this.state.value)) {
this.raise(this.state.start, "The keyword '" + this.state.value + "' is reserved");
+ }
+
node.name = this.state.value;
} else if (liberal && this.state.type.keyword) {
node.name = this.state.type.keyword;
} else {
this.unexpected();
}
+
+ if (!liberal && node.name === "await" && this.state.inAsync) {
+ this.raise(node.start, "invalid use of await inside of an async function");
+ }
+
this.next();
return this.finishNode(node, "Identifier");
};
@@ -793,7 +915,7 @@ pp.parseIdent = function (liberal) {
// Parses await expression inside async function.
pp.parseAwait = function (node) {
- if (this.eat(tt.semi) || this.canInsertSemicolon()) {
+ if (this.isLineTerminator()) {
this.unexpected();
}
node.all = this.eat(tt.star);
@@ -815,25 +937,3 @@ pp.parseYield = function () {
}
return this.finishNode(node, "YieldExpression");
};
-
-// Parses array and generator comprehensions.
-
-pp.parseComprehension = function (node, isGenerator) {
- node.blocks = [];
- while (this.match(tt._for)) {
- let block = this.startNode();
- this.next();
- this.expect(tt.parenL);
- block.left = this.parseBindingAtom();
- this.checkLVal(block.left, true);
- this.expectContextual("of");
- block.right = this.parseExpression();
- this.expect(tt.parenR);
- node.blocks.push(this.finishNode(block, "ComprehensionBlock"));
- }
- node.filter = this.eat(tt._if) ? this.parseParenExpression() : null;
- node.body = this.parseExpression();
- this.expect(isGenerator ? tt.parenR : tt.bracketR);
- node.generator = isGenerator;
- return this.finishNode(node, "ComprehensionExpression");
-};
diff --git a/src/parser/index.js b/src/parser/index.js
index 4185c725d9..6f9e2b3c26 100644
--- a/src/parser/index.js
+++ b/src/parser/index.js
@@ -1,24 +1,21 @@
-import { reservedWords, isKeyword } from "../util/identifier";
+/* @flow */
+
+import { reservedWords } from "../util/identifier";
import { getOptions } from "../options";
import Tokenizer from "../tokenizer";
-// Registered plugins
-
export const plugins = {};
export default class Parser extends Tokenizer {
- constructor(options, input) {
- super(input);
+ constructor(options, input: string) {
+ options = getOptions(options);
+ super(options, input);
- this.options = getOptions(options);
- this.isKeyword = isKeyword;
+ this.options = options;
+ this.inModule = this.options.sourceType === "module";
this.isReservedWord = reservedWords[6];
this.input = input;
- this.loadPlugins(this.options.plugins);
-
- // Figure out if it's a module code.
- this.inModule = this.options.sourceType === "module";
- this.strict = this.options.strictMode === false ? false : this.inModule;
+ this.plugins = this.loadPlugins(this.options.plugins);
// If enabled, skip leading hashbang line.
if (this.state.pos === 0 && this.input[0] === "#" && this.input[1] === "!") {
@@ -26,19 +23,40 @@ export default class Parser extends Tokenizer {
}
}
- extend(name, f) {
+ hasPlugin(name: string): boolean {
+ return !!(this.plugins["*"] || this.plugins[name]);
+ }
+
+ extend(name: string, f: Function) {
this[name] = f(this[name]);
}
- loadPlugins(plugins) {
- for (let name in plugins) {
- let plugin = exports.plugins[name];
- if (!plugin) throw new Error(`Plugin '${name}' not found`);
- plugin(this, plugins[name]);
+ loadPlugins(plugins: Array) {
+ let pluginMap = {};
+
+ if (plugins.indexOf("flow") >= 0) {
+ // ensure flow plugin loads last
+ plugins.splice(plugins.indexOf("flow"), 1);
+ plugins.push("flow");
}
+
+ for (let name of plugins) {
+ pluginMap[name] = true;
+
+ let plugin = exports.plugins[name];
+ if (plugin) plugin(this);
+ }
+
+ return pluginMap;
}
- parse() {
+ parse(): {
+ type: "File",
+ program: {
+ type: "Program",
+ body: Array
+ }
+ } {
let file = this.startNode();
let program = this.startNode();
this.nextToken();
diff --git a/src/parser/location.js b/src/parser/location.js
index c8f10cc172..3029551c43 100644
--- a/src/parser/location.js
+++ b/src/parser/location.js
@@ -1,3 +1,5 @@
+/* @flow */
+
import { getLineInfo } from "../util/location";
import Parser from "./index";
diff --git a/src/parser/lval.js b/src/parser/lval.js
index b8ee7bc63f..4955ff5b5b 100644
--- a/src/parser/lval.js
+++ b/src/parser/lval.js
@@ -1,3 +1,5 @@
+/* @flow */
+
import { types as tt } from "../tokenizer/types";
import Parser from "./index";
import { reservedWords } from "../util/identifier";
@@ -18,10 +20,20 @@ pp.toAssignable = function (node, isBinding) {
case "ObjectExpression":
node.type = "ObjectPattern";
- for (let prop of (node.properties: Array)) {
+ for (let prop of (node.properties: Array)) {
if (prop.type === "SpreadProperty") continue;
- if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter");
- this.toAssignable(prop.value, isBinding);
+
+ if (prop.type === "ObjectMethod") {
+ if (prop.kind === "get" || prop.kind === "set") {
+ this.raise(prop.key.start, "Object pattern can't contain getter or setter");
+ } else {
+ this.raise(prop.key.start, "Object pattern can't contain methods");
+ }
+ }
+
+ if (prop.type === "ObjectProperty") {
+ this.toAssignable(prop.value, isBinding);
+ }
}
break;
@@ -92,16 +104,27 @@ pp.parseSpread = function (refShorthandDefaultPos) {
pp.parseRest = function () {
let node = this.startNode();
this.next();
- node.argument = this.match(tt.name) || this.match(tt.bracketL) ? this.parseBindingAtom() : this.unexpected();
+ node.argument = this.parseBindingIdentifier();
return this.finishNode(node, "RestElement");
};
+pp.shouldAllowYieldIdentifier = function () {
+ return this.match(tt._yield) && !this.state.strict && !this.state.inGenerator;
+};
+
+pp.parseBindingIdentifier = function () {
+ return this.parseIdentifier(this.shouldAllowYieldIdentifier());
+};
+
// Parses lvalue (assignable) atom.
pp.parseBindingAtom = function () {
switch (this.state.type) {
+ case tt._yield:
+ if (this.state.strict || this.state.inGenerator) this.unexpected();
+
case tt.name:
- return this.parseIdent();
+ return this.parseIdentifier(true);
case tt.bracketL:
let node = this.startNode();
@@ -118,10 +141,14 @@ pp.parseBindingAtom = function () {
};
pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) {
- var elts = [], first = true;
+ let elts = [];
+ let first = true;
while (!this.eat(close)) {
- if (first) first = false;
- else this.expect(tt.comma);
+ if (first) {
+ first = false;
+ } else {
+ this.expect(tt.comma);
+ }
if (allowEmpty && this.match(tt.comma)) {
elts.push(null);
} else if (allowTrailingComma && this.eat(close)) {
@@ -131,7 +158,7 @@ pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) {
this.expect(close);
break;
} else {
- var left = this.parseMaybeDefault();
+ let left = this.parseMaybeDefault();
this.parseAssignableListItemTypes(left);
elts.push(this.parseMaybeDefault(null, null, left));
}
@@ -163,8 +190,10 @@ pp.parseMaybeDefault = function (startPos, startLoc, left) {
pp.checkLVal = function (expr, isBinding, checkClashes) {
switch (expr.type) {
case "Identifier":
- if (this.strict && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name)))
+ if (this.state.strict && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name))) {
this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
+ }
+
if (checkClashes) {
if (checkClashes[expr.name]) {
this.raise(expr.start, "Argument name clash in strict mode");
@@ -179,14 +208,14 @@ pp.checkLVal = function (expr, isBinding, checkClashes) {
break;
case "ObjectPattern":
- for (let prop of (expr.properties: Array)) {
- if (prop.type === "Property") prop = prop.value;
+ for (let prop of (expr.properties: Array)) {
+ if (prop.type === "ObjectProperty") prop = prop.value;
this.checkLVal(prop, isBinding, checkClashes);
}
break;
case "ArrayPattern":
- for (let elem of (expr.elements: Array)) {
+ for (let elem of (expr.elements: Array)) {
if (elem) this.checkLVal(elem, isBinding, checkClashes);
}
break;
@@ -195,7 +224,7 @@ pp.checkLVal = function (expr, isBinding, checkClashes) {
this.checkLVal(expr.left, isBinding, checkClashes);
break;
- case "SpreadProperty":
+ case "RestProperty":
case "RestElement":
this.checkLVal(expr.argument, isBinding, checkClashes);
break;
diff --git a/src/parser/node.js b/src/parser/node.js
index 7fb0cd2a62..e0dcf33b08 100644
--- a/src/parser/node.js
+++ b/src/parser/node.js
@@ -1,3 +1,5 @@
+/* @flow */
+
import Parser from "./index";
import { SourceLocation } from "../util/location";
@@ -5,27 +7,32 @@ import { SourceLocation } from "../util/location";
const pp = Parser.prototype;
-export class Node {
- constructor(parser, pos, loc) {
+class Node {
+ constructor(pos?: number, loc?: SourceLocation) {
this.type = "";
this.start = pos;
this.end = 0;
this.loc = new SourceLocation(loc);
}
- __clone() {
- var node2 = new Node;
- for (var key in this) node2[key] = this[key];
+ type: string;
+ start: ?number;
+ end: number;
+ loc: SourceLocation;
+
+ __clone(): Node {
+ let node2 = new Node;
+ for (let key in this) node2[key] = this[key];
return node2;
}
}
pp.startNode = function () {
- return new Node(this, this.state.start, this.state.startLoc);
+ return new Node(this.state.start, this.state.startLoc);
};
pp.startNodeAt = function (pos, loc) {
- return new Node(this, pos, loc);
+ return new Node(pos, loc);
};
function finishNodeAt(node, type, pos, loc) {
diff --git a/src/parser/statement.js b/src/parser/statement.js
index 18482415f8..ef7649dc4b 100644
--- a/src/parser/statement.js
+++ b/src/parser/statement.js
@@ -1,3 +1,5 @@
+/* @flow */
+
import { types as tt } from "../tokenizer/types";
import Parser from "./index";
import { lineBreak } from "../util/whitespace";
@@ -13,18 +15,8 @@ const pp = Parser.prototype;
pp.parseTopLevel = function (file, program) {
program.sourceType = this.options.sourceType;
- program.body = [];
- let first = true;
- while (!this.match(tt.eof)) {
- let stmt = this.parseStatement(true, true);
- program.body.push(stmt);
- if (first) {
- if (this.isUseStrict(stmt)) this.setStrict(true);
- first = false;
- }
- }
- this.next();
+ this.parseBlockBody(program, true, true, tt.eof);
file.program = this.finishNode(program, "Program");
file.comments = this.state.comments;
@@ -35,6 +27,26 @@ pp.parseTopLevel = function (file, program) {
const loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"};
+// TODO
+
+pp.parseDirective = function () {
+ let directiveLiteral = this.startNode();
+ let directive = this.startNode();
+
+ let raw = this.input.slice(this.state.start, this.state.end);
+ let val = directiveLiteral.value = raw.slice(1, -1); // remove quotes
+
+ this.addExtra(directiveLiteral, "raw", raw);
+ this.addExtra(directiveLiteral, "rawValue", val);
+
+ this.next();
+
+ directive.value = this.finishNode(directiveLiteral, "DirectiveLiteral");
+
+ this.semicolon();
+ return this.finishNode(directive, "Directive");
+};
+
// Parse a single statement.
//
// If expecting a statement and finding a slash operator, parse a
@@ -72,8 +84,14 @@ pp.parseStatement = function (declaration, topLevel) {
case tt._switch: return this.parseSwitchStatement(node);
case tt._throw: return this.parseThrowStatement(node);
case tt._try: return this.parseTryStatement(node);
- case tt._let: case tt._const: if (!declaration) this.unexpected(); // NOTE: falls through to _var
- case tt._var: return this.parseVarStatement(node, starttype);
+
+ case tt._let:
+ case tt._const:
+ if (!declaration) this.unexpected(); // NOTE: falls through to _var
+
+ case tt._var:
+ return this.parseVarStatement(node, starttype);
+
case tt._while: return this.parseWhileStatement(node);
case tt._with: return this.parseWithStatement(node);
case tt.braceL: return this.parseBlock();
@@ -81,18 +99,20 @@ pp.parseStatement = function (declaration, topLevel) {
case tt._export:
case tt._import:
if (!this.options.allowImportExportEverywhere) {
- if (!topLevel)
+ if (!topLevel) {
this.raise(this.state.start, "'import' and 'export' may only appear at the top level");
+ }
- if (!this.inModule)
+ if (!this.inModule) {
this.raise(this.state.start, "'import' and 'export' may appear only with 'sourceType: module'");
+ }
}
return starttype === tt._import ? this.parseImport(node) : this.parseExport(node);
case tt.name:
- if (this.options.features["es7.asyncFunctions"] && this.state.value === "async") {
+ if (this.hasPlugin("asyncFunctions") && this.state.value === "async") {
// peek ahead and see if next token is a function
- var state = this.state.clone();
+ let state = this.state.clone();
this.next();
if (this.match(tt._function) && !this.canInsertSemicolon()) {
this.expect(tt._function);
@@ -101,20 +121,19 @@ pp.parseStatement = function (declaration, topLevel) {
this.state = state;
}
}
+ }
- // If the statement does not start with a statement keyword or a
- // brace, it's an ExpressionStatement or LabeledStatement. We
- // simply start parsing an expression, and afterwards, if the
- // next token is a colon and the expression was a simple
- // Identifier node, we switch to interpreting it as a label.
- default:
- let maybeName = this.state.value, expr = this.parseExpression();
+ // If the statement does not start with a statement keyword or a
+ // brace, it's an ExpressionStatement or LabeledStatement. We
+ // simply start parsing an expression, and afterwards, if the
+ // next token is a colon and the expression was a simple
+ // Identifier node, we switch to interpreting it as a label.
+ let maybeName = this.state.value, expr = this.parseExpression();
- if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) {
- return this.parseLabeledStatement(node, maybeName, expr);
- } else {
- return this.parseExpressionStatement(node, expr);
- }
+ if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) {
+ return this.parseLabeledStatement(node, maybeName, expr);
+ } else {
+ return this.parseExpressionStatement(node, expr);
}
};
@@ -140,7 +159,7 @@ pp.parseDecorators = function (allowExport) {
};
pp.parseDecorator = function () {
- if (!this.options.features["es7.decorators"]) {
+ if (!this.hasPlugin("decorators")) {
this.unexpected();
}
let node = this.startNode();
@@ -153,18 +172,19 @@ pp.parseBreakContinueStatement = function (node, keyword) {
let isBreak = keyword === "break";
this.next();
- if (this.eat(tt.semi) || this.canInsertSemicolon()) {
+ if (this.isLineTerminator()) {
node.label = null;
} else if (!this.match(tt.name)) {
this.unexpected();
} else {
- node.label = this.parseIdent();
+ node.label = this.parseIdentifier();
this.semicolon();
}
// Verify that there is an actual destination to break or
// continue to.
- for (var i = 0; i < this.state.labels.length; ++i) {
+ let i;
+ for (i = 0; i < this.state.labels.length; ++i) {
let lab = this.state.labels[i];
if (node.label == null || lab.name === node.label.name) {
if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
@@ -214,9 +234,13 @@ pp.parseForStatement = function (node) {
this.next();
this.parseVar(init, true, varKind);
this.finishNode(init, "VariableDeclaration");
- if ((this.match(tt._in) || this.isContextual("of")) && init.declarations.length === 1 &&
- !(varKind !== tt._var && init.declarations[0].init))
- return this.parseForIn(node, init);
+
+ if (this.match(tt._in) || this.isContextual("of")) {
+ if (init.declarations.length === 1 && !init.declarations[0].init) {
+ return this.parseForIn(node, init);
+ }
+ }
+
return this.parseFor(node, init);
}
@@ -256,7 +280,7 @@ pp.parseReturnStatement = function (node) {
// optional arguments, we eagerly look for a semicolon or the
// possibility to insert one.
- if (this.eat(tt.semi) || this.canInsertSemicolon()) {
+ if (this.isLineTerminator()) {
node.argument = null;
} else {
node.argument = this.parseExpression();
@@ -277,7 +301,8 @@ pp.parseSwitchStatement = function (node) {
// nodes. `cur` is used to keep the node that we are currently
// adding statements to.
- for (var cur, sawDefault; !this.match(tt.braceR); ) {
+ let cur;
+ for (let sawDefault; !this.match(tt.braceR); ) {
if (this.match(tt._case) || this.match(tt._default)) {
let isCase = this.match(tt._case);
if (cur) this.finishNode(cur, "SwitchCase");
@@ -293,8 +318,11 @@ pp.parseSwitchStatement = function (node) {
}
this.expect(tt.colon);
} else {
- if (!cur) this.unexpected();
- cur.consequent.push(this.parseStatement(true));
+ if (cur) {
+ cur.consequent.push(this.parseStatement(true));
+ } else {
+ this.unexpected();
+ }
}
}
if (cur) this.finishNode(cur, "SwitchCase");
@@ -314,19 +342,23 @@ pp.parseThrowStatement = function (node) {
// Reused empty array added for node fields that are always empty.
-var empty = [];
+let empty = [];
pp.parseTryStatement = function (node) {
this.next();
+
node.block = this.parseBlock();
node.handler = null;
+
if (this.match(tt._catch)) {
let clause = this.startNode();
this.next();
+
this.expect(tt.parenL);
clause.param = this.parseBindingAtom();
- this.checkLVal(clause.param, true);
+ this.checkLVal(clause.param, true, Object.create(null));
this.expect(tt.parenR);
+
clause.body = this.parseBlock();
node.handler = this.finishNode(clause, "CatchClause");
}
@@ -358,7 +390,7 @@ pp.parseWhileStatement = function (node) {
};
pp.parseWithStatement = function (node) {
- if (this.strict) this.raise(this.state.start, "'with' in strict mode");
+ if (this.state.strict) this.raise(this.state.start, "'with' in strict mode");
this.next();
node.object = this.parseParenExpression();
node.body = this.parseStatement(false);
@@ -371,7 +403,7 @@ pp.parseEmptyStatement = function (node) {
};
pp.parseLabeledStatement = function (node, maybeName, expr) {
- for (let label of (this.state.labels: Array)){
+ for (let label of (this.state.labels: Array)){
if (label.name === maybeName) {
this.raise(expr.start, `Label '${maybeName}' is already declared`);
}
@@ -405,23 +437,62 @@ pp.parseExpressionStatement = function (node, expr) {
// strict"` declarations when `allowStrict` is true (used for
// function bodies).
-pp.parseBlock = function (allowStrict) {
- let node = this.startNode(), first = true, oldStrict;
- node.body = [];
+pp.parseBlock = function (allowDirectives?) {
+ let node = this.startNode();
this.expect(tt.braceL);
- while (!this.eat(tt.braceR)) {
- let stmt = this.parseStatement(true);
- node.body.push(stmt);
- if (first && allowStrict && this.isUseStrict(stmt)) {
- oldStrict = this.strict;
- this.setStrict(this.strict = true);
- }
- first = false;
- }
- if (oldStrict === false) this.setStrict(false);
+ this.parseBlockBody(node, allowDirectives, false, tt.braceR);
return this.finishNode(node, "BlockStatement");
};
+// TODO
+
+pp.parseBlockBody = function (node, allowDirectives, topLevel, end) {
+ node.body = [];
+ node.directives = [];
+
+ let parsedNonDirective = false;
+ let oldStrict;
+ let octalPosition;
+
+ while (!this.eat(end)) {
+ if (allowDirectives && !parsedNonDirective && this.match(tt.string)) {
+ let oldState = this.state;
+ let lookahead = this.lookahead();
+ this.state = lookahead;
+ let isDirective = this.isLineTerminator();
+ this.state = oldState;
+
+ if (isDirective) {
+ if (this.state.containsOctal && !octalPosition) {
+ octalPosition = this.state.octalPosition;
+ }
+
+ let stmt = this.parseDirective();
+ node.directives.push(stmt);
+
+ if (allowDirectives && stmt.value.value === "use strict") {
+ oldStrict = this.state.strict;
+ this.state.strict = true;
+ this.setStrict(true);
+
+ if (octalPosition) {
+ this.raise(octalPosition, "Octal literal in strict mode");
+ }
+ }
+
+ continue;
+ }
+ }
+
+ parsedNonDirective = true;
+ node.body.push(this.parseStatement(true, topLevel));
+ }
+
+ if (oldStrict === false) {
+ this.setStrict(false);
+ }
+};
+
// Parse a regular `for` loop. The disambiguation code in
// `parseStatement` will already have parsed the init statement or
// expression.
@@ -483,76 +554,142 @@ pp.parseVarHead = function (decl) {
// Parse a function declaration or literal (depending on the
// `isStatement` parameter).
-pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync) {
- this.initFunction(node, isAsync);
- node.generator = this.eat(tt.star);
+pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, optionalId) {
+ let oldInMethod = this.state.inMethod;
+ this.state.inMethod = false;
- if (isStatement || this.match(tt.name)) {
- node.id = this.parseIdent();
+ this.initFunction(node, isAsync);
+
+ if (this.match(tt.star)) {
+ if (node.async && !this.hasPlugin("asyncGenerators")) {
+ this.unexpected();
+ } else {
+ node.generator = true;
+ this.next();
+ }
+ }
+
+ if (isStatement && !optionalId && !this.match(tt.name) && !this.match(tt._yield)) {
+ this.unexpected();
+ }
+
+ if (this.match(tt.name) || this.match(tt._yield)) {
+ node.id = this.parseBindingIdentifier();
}
this.parseFunctionParams(node);
this.parseFunctionBody(node, allowExpressionBody);
+
+ this.state.inMethod = oldInMethod;
+
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
};
pp.parseFunctionParams = function (node) {
this.expect(tt.parenL);
- node.params = this.parseBindingList(tt.parenR, false, this.options.features["es7.trailingFunctionCommas"]);
+ node.params = this.parseBindingList(tt.parenR, false, this.hasPlugin("trailingFunctionCommas"));
};
// Parse a class declaration or literal (depending on the
// `isStatement` parameter).
-pp.parseClass = function (node, isStatement) {
+pp.parseClass = function (node, isStatement, optionalId) {
this.next();
- this.parseClassId(node, isStatement);
+ this.parseClassId(node, isStatement, optionalId);
this.parseClassSuper(node);
- var classBody = this.startNode();
+ this.parseClassBody(node);
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
+};
+
+pp.isClassProperty = function () {
+ return this.match(tt.eq) || this.isLineTerminator();
+};
+
+pp.parseClassBody = function (node) {
+ // class bodies are implicitly strict
+ let oldStrict = this.state.strict;
+ this.state.strict = true;
+
+ let hadConstructorCall = false;
let hadConstructor = false;
- classBody.body = [];
- this.expect(tt.braceL);
let decorators = [];
+ let classBody = this.startNode();
+
+ classBody.body = [];
+
+ this.expect(tt.braceL);
+
while (!this.eat(tt.braceR)) {
- if (this.eat(tt.semi)) continue;
+ if (this.eat(tt.semi)) {
+ continue;
+ }
+
if (this.match(tt.at)) {
decorators.push(this.parseDecorator());
continue;
}
- var method = this.startNode();
+
+ let method = this.startNode();
+
+ // steal the decorators if there are any
if (decorators.length) {
method.decorators = decorators;
decorators = [];
}
+
+ let isConstructorCall = false;
let isMaybeStatic = this.match(tt.name) && this.state.value === "static";
- var isGenerator = this.eat(tt.star), isAsync = false;
+ let isGenerator = this.eat(tt.star);
+ let isGetSet = false;
+ let isAsync = false;
+
this.parsePropertyName(method);
+
method.static = isMaybeStatic && !this.match(tt.parenL);
if (method.static) {
if (isGenerator) this.unexpected();
isGenerator = this.eat(tt.star);
this.parsePropertyName(method);
}
- if (!isGenerator && method.key.type === "Identifier" && !method.computed && this.isClassProperty()) {
- classBody.body.push(this.parseClassProperty(method));
- continue;
+
+ if (!isGenerator && method.key.type === "Identifier" && !method.computed) {
+ if (this.isClassProperty()) {
+ classBody.body.push(this.parseClassProperty(method));
+ continue;
+ }
+
+ if (this.hasPlugin("classConstructorCall") && method.key.name === "call" && this.match(tt.name) && this.state.value === "constructor") {
+ isConstructorCall = true;
+ this.parsePropertyName(method);
+ }
}
- if (this.options.features["es7.asyncFunctions"] && !this.match(tt.parenL) &&
- !method.computed && method.key.type === "Identifier" && method.key.name === "async") {
+
+ let isAsyncMethod = this.hasPlugin("asyncFunctions") && !this.match(tt.parenL) && !method.computed && method.key.type === "Identifier" && method.key.name === "async";
+ if (isAsyncMethod) {
+ if (this.hasPlugin("asyncGenerators") && this.eat(tt.star)) isGenerator = true;
isAsync = true;
this.parsePropertyName(method);
}
- let isGetSet = false;
+
method.kind = "method";
+
if (!method.computed) {
- let {key} = method;
+ let { key } = method;
+
+ // handle get/set methods
+ // eg. class Foo { get bar() {} set bar() {} }
if (!isAsync && !isGenerator && key.type === "Identifier" && !this.match(tt.parenL) && (key.name === "get" || key.name === "set")) {
isGetSet = true;
method.kind = key.name;
key = this.parsePropertyName(method);
}
- if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
- key.type === "Literal" && key.value === "constructor")) {
+
+ // disallow invalid constructors
+ let isConstructor = !isConstructorCall && !method.static && (
+ (key.type === "Identifier" && key.name === "constructor") ||
+ (key.type === "StringLiteral" && key.value === "constructor")
+ );
+ if (isConstructor) {
if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class");
if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier");
if (isGenerator) this.raise(key.start, "Constructor can't be a generator");
@@ -560,15 +697,37 @@ pp.parseClass = function (node, isStatement) {
method.kind = "constructor";
hadConstructor = true;
}
+
+ // disallow static prototype method
+ let isStaticPrototype = method.static && (
+ (key.type === "Identifier" && key.name === "prototype") ||
+ (key.type === "StringLiteral" && key.value === "prototype")
+ );
+ if (isStaticPrototype) {
+ this.raise(key.start, "Classes may not have static property named prototype");
+ }
}
- if (method.kind === "constructor" && method.decorators) {
+
+ // convert constructor to a constructor call
+ if (isConstructorCall) {
+ if (hadConstructorCall) this.raise(method.start, "Duplicate constructor call in the same class");
+ method.kind = "constructorCall";
+ hadConstructorCall = true;
+ }
+
+ // disallow decorators on class constructors
+ if ((method.kind === "constructor" || method.kind === "constructorCall") && method.decorators) {
this.raise(method.start, "You can't attach decorators to a class constructor");
}
+
this.parseClassMethod(classBody, method, isGenerator, isAsync);
+
+ // get methods aren't allowed to have any parameters
+ // set methods must have exactly 1 parameter
if (isGetSet) {
let paramCount = method.kind === "get" ? 0 : 1;
- if (method.value.params.length !== paramCount) {
- let start = method.value.start;
+ if (method.params.length !== paramCount) {
+ let start = method.start;
if (method.kind === "get") {
this.raise(start, "getter should have no params");
} else {
@@ -583,16 +742,13 @@ pp.parseClass = function (node, isStatement) {
}
node.body = this.finishNode(classBody, "ClassBody");
- return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
-};
-pp.isClassProperty = function () {
- return this.match(tt.eq) || (this.match(tt.semi) || this.canInsertSemicolon());
+ this.state.strict = oldStrict;
};
pp.parseClassProperty = function (node) {
if (this.match(tt.eq)) {
- if (!this.options.features["es7.classProperties"]) this.unexpected();
+ if (!this.hasPlugin("classProperties")) this.unexpected();
this.next();
node.value = this.parseMaybeAssign();
} else {
@@ -603,12 +759,20 @@ pp.parseClassProperty = function (node) {
};
pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) {
- method.value = this.parseMethod(isGenerator, isAsync);
- classBody.body.push(this.finishNode(method, "MethodDefinition"));
+ this.parseMethod(method, isGenerator, isAsync);
+ classBody.body.push(this.finishNode(method, "ClassMethod"));
};
-pp.parseClassId = function (node, isStatement) {
- node.id = this.match(tt.name) ? this.parseIdent() : isStatement ? this.unexpected() : null;
+pp.parseClassId = function (node, isStatement, optionalId) {
+ if (this.match(tt.name)) {
+ node.id = this.parseIdentifier();
+ } else {
+ if (optionalId || !isStatement) {
+ node.id = null;
+ } else {
+ this.unexpected();
+ }
+ }
};
pp.parseClassSuper = function (node) {
@@ -623,8 +787,8 @@ pp.parseExport = function (node) {
if (this.match(tt.star)) {
let specifier = this.startNode();
this.next();
- if (this.options.features["es7.exportExtensions"] && this.eatContextual("as")) {
- specifier.exported = this.parseIdent();
+ if (this.hasPlugin("exportExtensions") && this.eatContextual("as")) {
+ specifier.exported = this.parseIdentifier();
node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")];
this.parseExportSpecifiersMaybe(node);
this.parseExportFrom(node, true);
@@ -632,30 +796,31 @@ pp.parseExport = function (node) {
this.parseExportFrom(node, true);
return this.finishNode(node, "ExportAllDeclaration");
}
- } else if (this.options.features["es7.exportExtensions"] && this.isExportDefaultSpecifier()) {
+ } else if (this.hasPlugin("exportExtensions") && this.isExportDefaultSpecifier()) {
let specifier = this.startNode();
- specifier.exported = this.parseIdent(true);
+ specifier.exported = this.parseIdentifier(true);
node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
if (this.match(tt.comma) && this.lookahead().type === tt.star) {
this.expect(tt.comma);
let specifier = this.startNode();
this.expect(tt.star);
this.expectContextual("as");
- specifier.exported = this.parseIdent();
+ specifier.exported = this.parseIdentifier();
node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
} else {
this.parseExportSpecifiersMaybe(node);
}
this.parseExportFrom(node, true);
} else if (this.eat(tt._default)) { // export default ...
- let possibleDeclaration = this.match(tt._function) || this.match(tt._class);
- let expr = this.parseMaybeAssign();
- let needsSemi = true;
- if (possibleDeclaration) {
- needsSemi = false;
- if (expr.id) {
- expr.type = expr.type === "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration";
- }
+ let expr = this.startNode();
+ let needsSemi = false;
+ if (this.eat(tt._function)) {
+ expr = this.parseFunction(expr, true, false, false, true);
+ } else if (this.match(tt._class)) {
+ expr = this.parseClass(expr, true, true);
+ } else {
+ needsSemi = true;
+ expr = this.parseMaybeAssign();
}
node.declaration = expr;
if (needsSemi) this.semicolon();
@@ -687,7 +852,7 @@ pp.isExportDefaultSpecifier = function () {
return false;
}
- var lookahead = this.lookahead();
+ let lookahead = this.lookahead();
return lookahead.type === tt.comma || (lookahead.type === tt.name && lookahead.value === "from");
};
@@ -713,12 +878,12 @@ pp.parseExportFrom = function (node, expect?) {
};
pp.shouldParseExportDeclaration = function () {
- return this.options.features["es7.asyncFunctions"] && this.isContextual("async");
+ return this.hasPlugin("asyncFunctions") && this.isContextual("async");
};
pp.checkExport = function (node) {
if (this.state.decorators.length) {
- var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression");
+ let isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression");
if (!node.declaration || !isClass) {
this.raise(node.start, "You can only use decorators on an export when exporting a class");
}
@@ -729,7 +894,10 @@ pp.checkExport = function (node) {
// Parses a comma-separated list of module exports.
pp.parseExportSpecifiers = function () {
- let nodes = [], first = true;
+ let nodes = [];
+ let first = true;
+ let needsFrom;
+
// export { x, y as z } [from '...']
this.expect(tt.braceL);
@@ -741,12 +909,20 @@ pp.parseExportSpecifiers = function () {
if (this.eat(tt.braceR)) break;
}
+ let isDefault = this.match(tt._default);
+ if (isDefault && !needsFrom) needsFrom = true;
+
let node = this.startNode();
- node.local = this.parseIdent(this.match(tt._default));
- node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local.__clone();
+ node.local = this.parseIdentifier(isDefault);
+ node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone();
nodes.push(this.finishNode(node, "ExportSpecifier"));
}
+ // https://github.com/ember-cli/ember-cli/pull/3739
+ if (needsFrom && !this.isContextual("from")) {
+ this.unexpected();
+ }
+
return nodes;
};
@@ -772,11 +948,11 @@ pp.parseImport = function (node) {
// Parses a comma-separated list of module imports.
pp.parseImportSpecifiers = function (node) {
- var first = true;
+ let first = true;
if (this.match(tt.name)) {
// import defaultObj, { x, y as z } from '...'
- var startPos = this.state.start, startLoc = this.state.startLoc;
- node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(), startPos, startLoc));
+ let startPos = this.state.start, startLoc = this.state.startLoc;
+ node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), startPos, startLoc));
if (!this.eat(tt.comma)) return;
}
@@ -784,7 +960,7 @@ pp.parseImportSpecifiers = function (node) {
let specifier = this.startNode();
this.next();
this.expectContextual("as");
- specifier.local = this.parseIdent();
+ specifier.local = this.parseIdentifier();
this.checkLVal(specifier.local, true);
node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier"));
return;
@@ -800,15 +976,15 @@ pp.parseImportSpecifiers = function (node) {
}
let specifier = this.startNode();
- specifier.imported = this.parseIdent(true);
- specifier.local = this.eatContextual("as") ? this.parseIdent() : specifier.imported.__clone();
+ specifier.imported = this.parseIdentifier(true);
+ specifier.local = this.eatContextual("as") ? this.parseIdentifier() : specifier.imported.__clone();
this.checkLVal(specifier.local, true);
node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
}
};
pp.parseImportSpecifierDefault = function (id, startPos, startLoc) {
- var node = this.startNodeAt(startPos, startLoc);
+ let node = this.startNodeAt(startPos, startLoc);
node.local = id;
this.checkLVal(node.local, true);
return this.finishNode(node, "ImportDefaultSpecifier");
diff --git a/src/parser/util.js b/src/parser/util.js
index 51ca0bdc6f..64d4bffe3c 100644
--- a/src/parser/util.js
+++ b/src/parser/util.js
@@ -1,3 +1,5 @@
+/* @flow */
+
import { types as tt } from "../tokenizer/types";
import Parser from "./index";
import { lineBreak } from "../util/whitespace";
@@ -6,10 +8,13 @@ const pp = Parser.prototype;
// ## Parser utilities
-// Test whether a statement node is the string literal `"use strict"`.
+// TODO
-pp.isUseStrict = function (stmt) {
- return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict";
+pp.addExtra = function (node, key, val) {
+ if (!node) return;
+
+ let extra = node.extra = node.extra || {};
+ extra[key] = val;
};
// TODO
@@ -54,6 +59,12 @@ pp.canInsertSemicolon = function () {
lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
};
+// TODO
+
+pp.isLineTerminator = function () {
+ return this.eat(tt.semi) || this.canInsertSemicolon();
+};
+
// Consume a semicolon, or, failing that, see if we are allowed to
// pretend that there is a semicolon at this position.
diff --git a/src/plugins/flow.js b/src/plugins/flow.js
index 42f7692a60..25e0ced340 100644
--- a/src/plugins/flow.js
+++ b/src/plugins/flow.js
@@ -1,13 +1,15 @@
+/* @flow */
+
import { types as tt } from "../tokenizer/types";
import Parser from "../parser";
-var pp = Parser.prototype;
+let pp = Parser.prototype;
pp.flowParseTypeInitialiser = function (tok) {
- var oldInType = this.state.inType;
+ let oldInType = this.state.inType;
this.state.inType = true;
this.expect(tok || tt.colon);
- var type = this.flowParseType();
+ let type = this.flowParseType();
this.state.inType = oldInType;
return type;
};
@@ -21,10 +23,10 @@ pp.flowParseDeclareClass = function (node) {
pp.flowParseDeclareFunction = function (node) {
this.next();
- var id = node.id = this.parseIdent();
+ let id = node.id = this.parseIdentifier();
- var typeNode = this.startNode();
- var typeContainer = this.startNode();
+ let typeNode = this.startNode();
+ let typeContainer = this.startNode();
if (this.isRelational("<")) {
typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
@@ -33,7 +35,7 @@ pp.flowParseDeclareFunction = function (node) {
}
this.expect(tt.parenL);
- var tmp = this.flowParseFunctionTypeParams();
+ let tmp = this.flowParseFunctionTypeParams();
typeNode.params = tmp.params;
typeNode.rest = tmp.rest;
this.expect(tt.parenR);
@@ -76,14 +78,14 @@ pp.flowParseDeclareModule = function (node) {
if (this.match(tt.string)) {
node.id = this.parseExprAtom();
} else {
- node.id = this.parseIdent();
+ node.id = this.parseIdentifier();
}
- var bodyNode = node.body = this.startNode();
- var body = bodyNode.body = [];
+ let bodyNode = node.body = this.startNode();
+ let body = bodyNode.body = [];
this.expect(tt.braceL);
while (!this.match(tt.braceR)) {
- var node2 = this.startNode();
+ let node2 = this.startNode();
// todo: declare check
this.next();
@@ -100,7 +102,7 @@ pp.flowParseDeclareModule = function (node) {
// Interfaces
pp.flowParseInterfaceish = function (node, allowStatic) {
- node.id = this.parseIdent();
+ node.id = this.parseIdentifier();
if (this.isRelational("<")) {
node.typeParameters = this.flowParseTypeParameterDeclaration();
@@ -120,9 +122,9 @@ pp.flowParseInterfaceish = function (node, allowStatic) {
};
pp.flowParseInterfaceExtends = function () {
- var node = this.startNode();
+ let node = this.startNode();
- node.id = this.parseIdent();
+ node.id = this.parseIdentifier();
if (this.isRelational("<")) {
node.typeParameters = this.flowParseTypeParameterInstantiation();
} else {
@@ -140,7 +142,7 @@ pp.flowParseInterface = function (node) {
// Type aliases
pp.flowParseTypeAlias = function (node) {
- node.id = this.parseIdent();
+ node.id = this.parseIdentifier();
if (this.isRelational("<")) {
node.typeParameters = this.flowParseTypeParameterDeclaration();
@@ -157,7 +159,7 @@ pp.flowParseTypeAlias = function (node) {
// Type annotations
pp.flowParseTypeParameterDeclaration = function () {
- var node = this.startNode();
+ let node = this.startNode();
node.params = [];
this.expectRelational("<");
@@ -173,7 +175,7 @@ pp.flowParseTypeParameterDeclaration = function () {
};
pp.flowParseTypeParameterInstantiation = function () {
- var node = this.startNode(), oldInType = this.state.inType;
+ let node = this.startNode(), oldInType = this.state.inType;
node.params = [];
this.state.inType = true;
@@ -193,7 +195,7 @@ pp.flowParseTypeParameterInstantiation = function () {
};
pp.flowParseObjectPropertyKey = function () {
- return (this.match(tt.num) || this.match(tt.string)) ? this.parseExprAtom() : this.parseIdent(true);
+ return (this.match(tt.num) || this.match(tt.string)) ? this.parseExprAtom() : this.parseIdentifier(true);
};
pp.flowParseObjectTypeIndexer = function (node, isStatic) {
@@ -236,7 +238,7 @@ pp.flowParseObjectTypeMethodish = function (node) {
};
pp.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
- var node = this.startNodeAt(startPos, startLoc);
+ let node = this.startNodeAt(startPos, startLoc);
node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(startPos, startLoc));
node.static = isStatic;
node.key = key;
@@ -246,7 +248,7 @@ pp.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
};
pp.flowParseObjectTypeCallProperty = function (node, isStatic) {
- var valueNode = this.startNode();
+ let valueNode = this.startNode();
node.static = isStatic;
node.value = this.flowParseObjectTypeMethodish(valueNode);
this.flowObjectTypeSemicolon();
@@ -254,10 +256,10 @@ pp.flowParseObjectTypeCallProperty = function (node, isStatic) {
};
pp.flowParseObjectType = function (allowStatic) {
- var nodeStart = this.startNode();
- var node;
- var propertyKey;
- var isStatic;
+ let nodeStart = this.startNode();
+ let node;
+ let propertyKey;
+ let isStatic;
nodeStart.callProperties = [];
nodeStart.properties = [];
@@ -266,8 +268,8 @@ pp.flowParseObjectType = function (allowStatic) {
this.expect(tt.braceL);
while (!this.match(tt.braceR)) {
- var optional = false;
- var startPos = this.state.start, startLoc = this.state.startLoc;
+ let optional = false;
+ let startPos = this.state.start, startLoc = this.state.startLoc;
node = this.startNode();
if (allowStatic && this.isContextual("static")) {
this.next();
@@ -280,7 +282,7 @@ pp.flowParseObjectType = function (allowStatic) {
nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, allowStatic));
} else {
if (isStatic && this.match(tt.colon)) {
- propertyKey = this.parseIdent();
+ propertyKey = this.parseIdentifier();
} else {
propertyKey = this.flowParseObjectPropertyKey();
}
@@ -313,15 +315,15 @@ pp.flowObjectTypeSemicolon = function () {
};
pp.flowParseGenericType = function (startPos, startLoc, id) {
- var node = this.startNodeAt(startPos, startLoc);
+ let node = this.startNodeAt(startPos, startLoc);
node.typeParameters = null;
node.id = id;
while (this.eat(tt.dot)) {
- var node2 = this.startNodeAt(startPos, startLoc);
+ let node2 = this.startNodeAt(startPos, startLoc);
node2.qualification = node.id;
- node2.id = this.parseIdent();
+ node2.id = this.parseIdentifier();
node.id = this.finishNode(node2, "QualifiedTypeIdentifier");
}
@@ -333,14 +335,14 @@ pp.flowParseGenericType = function (startPos, startLoc, id) {
};
pp.flowParseTypeofType = function () {
- var node = this.startNode();
+ let node = this.startNode();
this.expect(tt._typeof);
node.argument = this.flowParsePrimaryType();
return this.finishNode(node, "TypeofTypeAnnotation");
};
pp.flowParseTupleType = function () {
- var node = this.startNode();
+ let node = this.startNode();
node.types = [];
this.expect(tt.bracketL);
// We allow trailing commas
@@ -354,9 +356,9 @@ pp.flowParseTupleType = function () {
};
pp.flowParseFunctionTypeParam = function () {
- var optional = false;
- var node = this.startNode();
- node.name = this.parseIdent();
+ let optional = false;
+ let node = this.startNode();
+ node.name = this.parseIdentifier();
if (this.eat(tt.question)) {
optional = true;
}
@@ -366,7 +368,7 @@ pp.flowParseFunctionTypeParam = function () {
};
pp.flowParseFunctionTypeParams = function () {
- var ret = { params: [], rest: null };
+ let ret = { params: [], rest: null };
while (this.match(tt.name)) {
ret.params.push(this.flowParseFunctionTypeParam());
if (!this.match(tt.parenR)) {
@@ -409,15 +411,15 @@ pp.flowIdentToTypeAnnotation = function (startPos, startLoc, node, id) {
// primary types are kind of like primary expressions...they're the
// primitives with which other types are constructed.
pp.flowParsePrimaryType = function () {
- var startPos = this.state.start, startLoc = this.state.startLoc;
- var node = this.startNode();
- var tmp;
- var type;
- var isGroupedType = false;
+ let startPos = this.state.start, startLoc = this.state.startLoc;
+ let node = this.startNode();
+ let tmp;
+ let type;
+ let isGroupedType = false;
switch (this.state.type) {
case tt.name:
- return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdent());
+ return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
case tt.braceL:
return this.flowParseObjectType();
@@ -447,7 +449,7 @@ pp.flowParsePrimaryType = function () {
// Check to see if this is actually a grouped type
if (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {
if (this.match(tt.name)) {
- var token = this.lookahead().type;
+ let token = this.lookahead().type;
isGroupedType = token !== tt.question && token !== tt.colon;
} else {
isGroupedType = true;
@@ -488,8 +490,9 @@ pp.flowParsePrimaryType = function () {
return this.finishNode(node, "FunctionTypeAnnotation");
case tt.string:
- node.rawValue = node.value = this.state.value;
- node.raw = this.input.slice(this.state.start, this.state.end);
+ node.value = this.state.value;
+ this.addExtra(node, "rawValue", node.value);
+ this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
this.next();
return this.finishNode(node, "StringLiteralTypeAnnotation");
@@ -499,8 +502,9 @@ pp.flowParsePrimaryType = function () {
return this.finishNode(node, "BooleanLiteralTypeAnnotation");
case tt.num:
- node.rawValue = node.value = this.state.value;
- node.raw = this.input.slice(this.state.start, this.state.end);
+ node.value = this.state.value;
+ this.addExtra(node, "rawValue", node.value);
+ this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
this.next();
return this.finishNode(node, "NumberLiteralTypeAnnotation");
@@ -514,8 +518,8 @@ pp.flowParsePrimaryType = function () {
};
pp.flowParsePostfixType = function () {
- var node = this.startNode();
- var type = node.elementType = this.flowParsePrimaryType();
+ let node = this.startNode();
+ let type = node.elementType = this.flowParsePrimaryType();
if (this.match(tt.bracketL)) {
this.expect(tt.bracketL);
this.expect(tt.bracketR);
@@ -526,7 +530,7 @@ pp.flowParsePostfixType = function () {
};
pp.flowParsePrefixType = function () {
- var node = this.startNode();
+ let node = this.startNode();
if (this.eat(tt.question)) {
node.typeAnnotation = this.flowParsePrefixType();
return this.finishNode(node, "NullableTypeAnnotation");
@@ -536,8 +540,8 @@ pp.flowParsePrefixType = function () {
};
pp.flowParseIntersectionType = function () {
- var node = this.startNode();
- var type = this.flowParsePrefixType();
+ let node = this.startNode();
+ let type = this.flowParsePrefixType();
node.types = [type];
while (this.eat(tt.bitwiseAND)) {
node.types.push(this.flowParsePrefixType());
@@ -546,8 +550,8 @@ pp.flowParseIntersectionType = function () {
};
pp.flowParseUnionType = function () {
- var node = this.startNode();
- var type = this.flowParseIntersectionType();
+ let node = this.startNode();
+ let type = this.flowParseIntersectionType();
node.types = [type];
while (this.eat(tt.bitwiseOR)) {
node.types.push(this.flowParseIntersectionType());
@@ -556,22 +560,22 @@ pp.flowParseUnionType = function () {
};
pp.flowParseType = function () {
- var oldInType = this.state.inType;
+ let oldInType = this.state.inType;
this.state.inType = true;
- var type = this.flowParseUnionType();
+ let type = this.flowParseUnionType();
this.state.inType = oldInType;
return type;
};
pp.flowParseTypeAnnotation = function () {
- var node = this.startNode();
+ let node = this.startNode();
node.typeAnnotation = this.flowParseTypeInitialiser();
return this.finishNode(node, "TypeAnnotation");
};
pp.flowParseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOptionalParam) {
- var ident = this.parseIdent();
- var isOptionalParam = false;
+ let ident = this.parseIdentifier();
+ let isOptionalParam = false;
if (canBeOptionalParam && this.eat(tt.question)) {
this.expect(tt.question);
@@ -592,7 +596,7 @@ pp.flowParseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOp
};
export default function (instance) {
- // function name(): string {}
+ // plain function return types: function name(): string {}
instance.extend("parseFunctionBody", function (inner) {
return function (node, allowExpression) {
if (this.match(tt.colon) && !allowExpression) {
@@ -605,11 +609,12 @@ export default function (instance) {
};
});
+ // interfaces
instance.extend("parseStatement", function (inner) {
return function (declaration, topLevel) {
// strict mode handling of `interface` since it's a reserved word
- if (this.strict && this.match(tt.name) && this.state.value === "interface") {
- var node = this.startNode();
+ if (this.state.strict && this.match(tt.name) && this.state.value === "interface") {
+ let node = this.startNode();
this.next();
return this.flowParseInterface(node);
} else {
@@ -618,6 +623,7 @@ export default function (instance) {
};
});
+ // declares, interfaces and type aliases
instance.extend("parseExpressionStatement", function (inner) {
return function (node, expr) {
if (expr.type === "Identifier") {
@@ -638,6 +644,7 @@ export default function (instance) {
};
});
+ // export type
instance.extend("shouldParseExportDeclaration", function (inner) {
return function () {
return this.isContextual("type") || inner.call(this);
@@ -647,7 +654,7 @@ export default function (instance) {
instance.extend("parseParenItem", function () {
return function (node, startLoc, startPos, forceArrow?) {
if (this.match(tt.colon)) {
- var typeCastNode = this.startNodeAt(startLoc, startPos);
+ let typeCastNode = this.startNodeAt(startLoc, startPos);
typeCastNode.expression = node;
typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
@@ -657,7 +664,7 @@ export default function (instance) {
if (this.eat(tt.arrow)) {
// ((lol): number => {});
- var func = this.parseArrowExpression(this.startNodeAt(startLoc, startPos), [node]);
+ let func = this.parseArrowExpression(this.startNodeAt(startLoc, startPos), [node]);
func.returnType = typeCastNode.typeAnnotation;
return func;
} else {
@@ -684,7 +691,7 @@ export default function (instance) {
if (this.isContextual("type")) {
node.exportKind = "type";
- var declarationNode = this.startNode();
+ let declarationNode = this.startNode();
this.next();
if (this.match(tt.braceL)) {
@@ -703,8 +710,8 @@ export default function (instance) {
});
instance.extend("parseClassId", function (inner) {
- return function (node, isStatement) {
- inner.call(this, node, isStatement);
+ return function (node) {
+ inner.apply(this, arguments);
if (this.isRelational("<")) {
node.typeParameters = this.flowParseTypeParameterDeclaration();
}
@@ -723,6 +730,7 @@ export default function (instance) {
};
});
+ // ensure that inside flow types, we bypass the jsx parser plugin
instance.extend("readToken", function (inner) {
return function (code) {
if (this.state.inType && (code === 62 || code === 60)) {
@@ -733,6 +741,7 @@ export default function (instance) {
};
});
+ // don't lex any token as a jsx one inside a flow type
instance.extend("jsx_readToken", function (inner) {
return function () {
if (!this.state.inType) return inner.call(this);
@@ -744,10 +753,11 @@ export default function (instance) {
return node.expression;
}
+ // turn type casts that we found in function parameter head into type annotated params
instance.extend("toAssignableList", function (inner) {
return function (exprList, isBinding) {
- for (var i = 0; i < exprList.length; i++) {
- var expr = exprList[i];
+ for (let i = 0; i < exprList.length; i++) {
+ let expr = exprList[i];
if (expr && expr.type === "TypeCastExpression") {
exprList[i] = typeCastToParameter(expr);
}
@@ -756,10 +766,12 @@ export default function (instance) {
};
});
+ // this is a list of nodes, from something like a call expression, we need to filter the
+ // type casts that we've found that are illegal in this context
instance.extend("toReferencedList", function () {
return function (exprList) {
- for (var i = 0; i < exprList.length; i++) {
- var expr = exprList[i];
+ for (let i = 0; i < exprList.length; i++) {
+ let expr = exprList[i];
if (expr && expr._exprListItem && expr.type === "TypeCastExpression") {
this.raise(expr.start, "Unexpected type cast");
}
@@ -769,10 +781,12 @@ export default function (instance) {
};
});
+ // parse an item inside a expression list eg. `(NODE, NODE)` where NODE represents
+ // the position where this function is cal;ed
instance.extend("parseExprListItem", function (inner) {
return function (allowEmpty, refShorthandDefaultPos) {
- var container = this.startNode();
- var node = inner.call(this, allowEmpty, refShorthandDefaultPos);
+ let container = this.startNode();
+ let node = inner.call(this, allowEmpty, refShorthandDefaultPos);
if (this.match(tt.colon)) {
container._exprListItem = true;
container.expression = node;
@@ -784,6 +798,7 @@ export default function (instance) {
};
});
+ // parse class property type annotations
instance.extend("parseClassProperty", function (inner) {
return function (node) {
if (this.match(tt.colon)) {
@@ -793,24 +808,25 @@ export default function (instance) {
};
});
+ // determine whether or not we're currently in the position where a class property would appear
instance.extend("isClassProperty", function (inner) {
return function () {
return this.match(tt.colon) || inner.call(this);
};
});
+ // parse type parameters for class methods
instance.extend("parseClassMethod", function () {
return function (classBody, method, isGenerator, isAsync) {
- var typeParameters;
if (this.isRelational("<")) {
- typeParameters = this.flowParseTypeParameterDeclaration();
+ method.typeParameters = this.flowParseTypeParameterDeclaration();
}
- method.value = this.parseMethod(isGenerator, isAsync);
- method.value.typeParameters = typeParameters;
- classBody.body.push(this.finishNode(method, "MethodDefinition"));
+ this.parseMethod(method, isGenerator, isAsync);
+ classBody.body.push(this.finishNode(method, "ClassMethod"));
};
});
+ // parse a the super class type parameters and implements
instance.extend("parseClassSuper", function (inner) {
return function (node, isStatement) {
inner.call(this, node, isStatement);
@@ -819,10 +835,10 @@ export default function (instance) {
}
if (this.isContextual("implements")) {
this.next();
- var implemented = node.implements = [];
+ let implemented = node.implements = [];
do {
let node = this.startNode();
- node.id = this.parseIdent();
+ node.id = this.parseIdentifier();
if (this.isRelational("<")) {
node.typeParameters = this.flowParseTypeParameterInstantiation();
} else {
@@ -834,9 +850,10 @@ export default function (instance) {
};
});
+ // parse type parameters for object method shorthand
instance.extend("parseObjPropValue", function (inner) {
return function (prop) {
- var typeParameters;
+ let typeParameters;
// method shorthand
if (this.isRelational("<")) {
@@ -848,7 +865,7 @@ export default function (instance) {
// add typeParameters if we found them
if (typeParameters) {
- prop.value.typeParameters = typeParameters;
+ (prop.value || prop).typeParameters = typeParameters;
}
};
});
@@ -866,13 +883,20 @@ export default function (instance) {
};
});
+
+ // parse typeof and type imports
instance.extend("parseImportSpecifiers", function (inner) {
return function (node) {
node.importKind = "value";
- var kind = (this.match(tt._typeof) ? "typeof" : (this.isContextual("type") ? "type" : null));
+ let kind = null;
+ if (this.match(tt._typeof)) {
+ kind = "typeof";
+ } else if (this.isContextual("type")) {
+ kind = "type";
+ }
if (kind) {
- var lh = this.lookahead();
+ let lh = this.lookahead();
if ((lh.type === tt.name && lh.value !== "from") || lh.type === tt.braceL || lh.type === tt.star) {
this.next();
node.importKind = kind;
@@ -883,7 +907,7 @@ export default function (instance) {
};
});
- // function foo() {}
+ // parse function type parameters - function foo() {}
instance.extend("parseFunctionParams", function (inner) {
return function (node) {
if (this.isRelational("<")) {
@@ -893,7 +917,7 @@ export default function (instance) {
};
});
- // var foo: string = bar
+ // parse flow type annotations on variable declarator heads - let foo: string = bar
instance.extend("parseVarHead", function (inner) {
return function (decl) {
inner.call(this, decl);
@@ -904,7 +928,7 @@ export default function (instance) {
};
});
- // var foo = (async (): number => {});
+ // parse the return type of an async arrow function - let foo = (async (): number => {});
instance.extend("parseAsyncArrowFromCallExpression", function (inner) {
return function (node, call) {
if (this.match(tt.colon)) {
@@ -915,13 +939,21 @@ export default function (instance) {
};
});
+ // todo description
+ instance.extend("shouldParseAsyncArrow", function (inner) {
+ return function () {
+ return this.match(tt.colon) || inner.call(this);
+ };
+ });
+
+ // handle return types for arrow functions
instance.extend("parseParenAndDistinguishExpression", function (inner) {
return function (startPos, startLoc, canBeArrow, isAsync) {
startPos = startPos || this.state.start;
startLoc = startLoc || this.state.startLoc;
if (this.lookahead().type === tt.parenR) {
- // var foo = (): number => {};
+ // let foo = (): number => {};
this.expect(tt.parenL);
this.expect(tt.parenR);
@@ -930,11 +962,11 @@ export default function (instance) {
this.expect(tt.arrow);
return this.parseArrowExpression(node, [], isAsync);
} else {
- // var foo = (foo): number => {};
+ // let foo = (foo): number => {};
let node = inner.call(this, startPos, startLoc, canBeArrow, isAsync);
if (this.match(tt.colon)) {
- var state = this.state.clone();
+ let state = this.state.clone();
try {
return this.parseParenItem(node, startPos, startLoc, true);
} catch (err) {
diff --git a/src/plugins/jsx/index.js b/src/plugins/jsx/index.js
index f573fff9e9..2d466d4ece 100644
--- a/src/plugins/jsx/index.js
+++ b/src/plugins/jsx/index.js
@@ -1,3 +1,5 @@
+/* @flow */
+
import XHTMLEntities from "./xhtml";
import { TokenType, types as tt } from "../../tokenizer/types";
import { TokContext, types as tc } from "../../tokenizer/context";
@@ -24,7 +26,7 @@ tt.jsxTagStart.updateContext = function() {
};
tt.jsxTagEnd.updateContext = function(prevType) {
- var out = this.state.context.pop();
+ let out = this.state.context.pop();
if (out === tc.j_oTag && prevType === tt.slash || out === tc.j_cTag) {
this.state.context.pop();
this.state.exprAllowed = this.curContext() === tc.j_expr;
@@ -33,18 +35,19 @@ tt.jsxTagEnd.updateContext = function(prevType) {
}
};
-var pp = Parser.prototype;
+let pp = Parser.prototype;
// Reads inline JSX contents token.
pp.jsxReadToken = function() {
- var out = "", chunkStart = this.state.pos;
+ let out = "";
+ let chunkStart = this.state.pos;
for (;;) {
if (this.state.pos >= this.input.length) {
this.raise(this.state.start, "Unterminated JSX contents");
}
- var ch = this.input.charCodeAt(this.state.pos);
+ let ch = this.input.charCodeAt(this.state.pos);
switch (ch) {
case 60: // "<"
@@ -78,8 +81,8 @@ pp.jsxReadToken = function() {
};
pp.jsxReadNewLine = function(normalizeCRLF) {
- var ch = this.input.charCodeAt(this.state.pos);
- var out;
+ let ch = this.input.charCodeAt(this.state.pos);
+ let out;
++this.state.pos;
if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
++this.state.pos;
@@ -94,13 +97,14 @@ pp.jsxReadNewLine = function(normalizeCRLF) {
};
pp.jsxReadString = function(quote) {
- var out = "", chunkStart = ++this.state.pos;
+ let out = "";
+ let chunkStart = ++this.state.pos;
for (;;) {
if (this.state.pos >= this.input.length) {
this.raise(this.state.start, "Unterminated string constant");
}
- var ch = this.input.charCodeAt(this.state.pos);
+ let ch = this.input.charCodeAt(this.state.pos);
if (ch === quote) break;
if (ch === 38) { // "&"
out += this.input.slice(chunkStart, this.state.pos);
@@ -119,10 +123,12 @@ pp.jsxReadString = function(quote) {
};
pp.jsxReadEntity = function() {
- var str = "", count = 0, entity;
- var ch = this.input[this.state.pos];
+ let str = "";
+ let count = 0;
+ let entity;
+ let ch = this.input[this.state.pos];
- var startPos = ++this.state.pos;
+ let startPos = ++this.state.pos;
while (this.state.pos < this.input.length && count++ < 10) {
ch = this.input[this.state.pos++];
if (ch === ";") {
@@ -159,7 +165,8 @@ pp.jsxReadEntity = function() {
// by isIdentifierStart in readToken.
pp.jsxReadWord = function() {
- var ch, start = this.state.pos;
+ let ch;
+ let start = this.state.pos;
do {
ch = this.input.charCodeAt(++this.state.pos);
} while (isIdentifierChar(ch) || ch === 45); // "-"
@@ -185,7 +192,7 @@ function getQualifiedJSXName(object) {
// Parse next token as JSX identifier
pp.jsxParseIdentifier = function() {
- var node = this.startNode();
+ let node = this.startNode();
if (this.match(tt.jsxName)) {
node.name = this.state.value;
} else if (this.state.type.keyword) {
@@ -200,11 +207,11 @@ pp.jsxParseIdentifier = function() {
// Parse namespaced identifier.
pp.jsxParseNamespacedName = function() {
- var startPos = this.state.start, startLoc = this.state.startLoc;
- var name = this.jsxParseIdentifier();
+ let startPos = this.state.start, startLoc = this.state.startLoc;
+ let name = this.jsxParseIdentifier();
if (!this.eat(tt.colon)) return name;
- var node = this.startNodeAt(startPos, startLoc);
+ let node = this.startNodeAt(startPos, startLoc);
node.namespace = name;
node.name = this.jsxParseIdentifier();
return this.finishNode(node, "JSXNamespacedName");
@@ -214,10 +221,10 @@ pp.jsxParseNamespacedName = function() {
// or single identifier.
pp.jsxParseElementName = function() {
- var startPos = this.state.start, startLoc = this.state.startLoc;
- var node = this.jsxParseNamespacedName();
+ let startPos = this.state.start, startLoc = this.state.startLoc;
+ let node = this.jsxParseNamespacedName();
while (this.eat(tt.dot)) {
- var newNode = this.startNodeAt(startPos, startLoc);
+ let newNode = this.startNodeAt(startPos, startLoc);
newNode.object = node;
newNode.property = this.jsxParseIdentifier();
node = this.finishNode(newNode, "JSXMemberExpression");
@@ -228,7 +235,7 @@ pp.jsxParseElementName = function() {
// Parses any type of JSX attribute value.
pp.jsxParseAttributeValue = function() {
- var node;
+ let node;
switch (this.state.type) {
case tt.braceL:
node = this.jsxParseExpressionContainer();
@@ -241,7 +248,7 @@ pp.jsxParseAttributeValue = function() {
case tt.jsxTagStart:
case tt.string:
node = this.parseExprAtom();
- node.rawValue = null;
+ node.extra = null;
return node;
default:
@@ -249,27 +256,20 @@ pp.jsxParseAttributeValue = function() {
}
};
-// JSXEmptyExpression is unique type since it doesn"t actually parse anything,
+// JSXEmptyExpression is unique type since it doesn't actually parse anything,
// and so it should start at the end of last read token (left brace) and finish
// at the beginning of the next one (right brace).
pp.jsxParseEmptyExpression = function() {
- var tmp = this.state.start;
- this.state.start = this.state.lastTokEnd;
- this.state.lastTokEnd = tmp;
-
- tmp = this.state.startLoc;
- this.state.startLoc = this.state.lastTokEndLoc;
- this.state.lastTokEndLoc = tmp;
-
- return this.finishNode(this.startNode(), "JSXEmptyExpression");
+ let node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
+ return this.finishNodeAt(node, "JSXEmptyExpression", this.start, this.startLoc);
};
// Parses JSX expression enclosed into curly brackets.
pp.jsxParseExpressionContainer = function() {
- var node = this.startNode();
+ let node = this.startNode();
this.next();
if (this.match(tt.braceR)) {
node.expression = this.jsxParseEmptyExpression();
@@ -283,7 +283,7 @@ pp.jsxParseExpressionContainer = function() {
// Parses following JSX attribute name-value pair.
pp.jsxParseAttribute = function() {
- var node = this.startNode();
+ let node = this.startNode();
if (this.eat(tt.braceL)) {
this.expect(tt.ellipsis);
node.argument = this.parseMaybeAssign();
@@ -298,7 +298,7 @@ pp.jsxParseAttribute = function() {
// Parses JSX opening tag starting after "<".
pp.jsxParseOpeningElementAt = function(startPos, startLoc) {
- var node = this.startNodeAt(startPos, startLoc);
+ let node = this.startNodeAt(startPos, startLoc);
node.attributes = [];
node.name = this.jsxParseElementName();
while (!this.match(tt.slash) && !this.match(tt.jsxTagEnd)) {
@@ -312,7 +312,7 @@ pp.jsxParseOpeningElementAt = function(startPos, startLoc) {
// Parses JSX closing tag starting after "".
pp.jsxParseClosingElementAt = function(startPos, startLoc) {
- var node = this.startNodeAt(startPos, startLoc);
+ let node = this.startNodeAt(startPos, startLoc);
node.name = this.jsxParseElementName();
this.expect(tt.jsxTagEnd);
return this.finishNode(node, "JSXClosingElement");
@@ -322,10 +322,10 @@ pp.jsxParseClosingElementAt = function(startPos, startLoc) {
// (starting after "<"), attributes, contents and closing tag.
pp.jsxParseElementAt = function(startPos, startLoc) {
- var node = this.startNodeAt(startPos, startLoc);
- var children = [];
- var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
- var closingElement = null;
+ let node = this.startNodeAt(startPos, startLoc);
+ let children = [];
+ let openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
+ let closingElement = null;
if (!openingElement.selfClosing) {
contents: for (;;) {
@@ -373,7 +373,7 @@ pp.jsxParseElementAt = function(startPos, startLoc) {
// Parses entire JSX element from current position.
pp.jsxParseElement = function() {
- var startPos = this.state.start, startLoc = this.state.startLoc;
+ let startPos = this.state.start, startLoc = this.state.startLoc;
this.next();
return this.jsxParseElementAt(startPos, startLoc);
};
@@ -382,9 +382,9 @@ export default function(instance) {
instance.extend("parseExprAtom", function(inner) {
return function(refShortHandDefaultPos) {
if (this.match(tt.jsxText)) {
- var node = this.parseLiteral(this.state.value);
+ let node = this.parseLiteral(this.state.value, "JSXText");
// https://github.com/babel/babel/issues/2078
- node.rawValue = null;
+ node.extra = null;
return node;
} else if (this.match(tt.jsxTagStart)) {
return this.jsxParseElement();
@@ -396,7 +396,7 @@ export default function(instance) {
instance.extend("readToken", function(inner) {
return function(code) {
- var context = this.curContext();
+ let context = this.curContext();
if (context === tc.j_expr) {
return this.jsxReadToken();
@@ -429,7 +429,7 @@ export default function(instance) {
instance.extend("updateContext", function(inner) {
return function(prevType) {
if (this.match(tt.braceL)) {
- var curContext = this.curContext();
+ let curContext = this.curContext();
if (curContext === tc.j_oTag) {
this.state.context.push(tc.b_expr);
} else if (curContext === tc.j_expr) {
diff --git a/src/tokenizer/context.js b/src/tokenizer/context.js
index 05fb07056f..ef44998c8d 100644
--- a/src/tokenizer/context.js
+++ b/src/tokenizer/context.js
@@ -1,3 +1,5 @@
+/* @flow */
+
// The algorithm used to determine whether a regexp can appear at a
// given point in the program is loosely based on sweet.js' approach.
// See https://github.com/mozilla/sweet.js/wiki/design
@@ -5,12 +7,22 @@
import { types as tt } from "./types";
export class TokContext {
- constructor(token, isExpr, preserveSpace, override) {
+ constructor(
+ token: string,
+ isExpr?: boolean,
+ preserveSpace?: boolean,
+ override?: Function,
+ ) {
this.token = token;
this.isExpr = !!isExpr;
this.preserveSpace = !!preserveSpace;
this.override = override;
}
+
+ token: string;
+ isExpr: boolean;
+ preserveSpace: boolean;
+ override: ?Function;
}
export const types = {
diff --git a/src/tokenizer/index.js b/src/tokenizer/index.js
index 7bff031091..7de9e332c1 100644
--- a/src/tokenizer/index.js
+++ b/src/tokenizer/index.js
@@ -1,4 +1,7 @@
-import { isIdentifierStart, isIdentifierChar } from "../util/identifier";
+/* @flow */
+
+import type { TokenType } from "./types";
+import { isIdentifierStart, isIdentifierChar, isKeyword } from "../util/identifier";
import { types as tt, keywords as keywordTypes } from "./types";
import { types as ct } from "./context";
import { SourceLocation } from "../util/location";
@@ -17,46 +20,37 @@ export class Token {
this.end = state.end;
this.loc = new SourceLocation(state.startLoc, state.endLoc);
}
+
+ type: TokenType;
+ value: any;
+ start: number;
+ end: number;
+ loc: SourceLocation;
}
// ## Tokenizer
-// Are we running under Rhino?
-/* global Packages */
-const isRhino = typeof Packages === "object" && Object.prototype.toString.call(Packages) === "[object JavaPackage]";
-
-// Parse a regular expression. Some context-awareness is necessary,
-// since a '/' inside a '[]' set does not end the expression.
-
-function tryCreateRegexp(src, flags, throwErrorStart) {
- try {
- return new RegExp(src, flags);
- } catch (e) {
- if (throwErrorStart !== undefined) {
- if (e instanceof SyntaxError) this.raise(throwErrorStart, "Error parsing regular expression: " + e.message);
- this.raise(e);
- }
+function codePointToString(code) {
+ // UTF-16 Decoding
+ if (code <= 0xFFFF) {
+ return String.fromCharCode(code);
+ } else {
+ return String.fromCharCode(((code - 0x10000) >> 10) + 0xD800, ((code - 0x10000) & 1023) + 0xDC00);
}
}
-var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u");
-
-function codePointToString(code) {
- // UTF-16 Decoding
- if (code <= 0xFFFF) return String.fromCharCode(code);
- return String.fromCharCode(((code - 0x10000) >> 10) + 0xD800, ((code - 0x10000) & 1023) + 0xDC00);
-}
-
export default class Tokenizer {
- constructor(input) {
+ constructor(options, input) {
this.state = new State;
- this.state.init(input);
+ this.state.init(options, input);
}
// Move to the next token
next() {
- this.state.tokens.push(new Token(this.state));
+ if (!this.isLookahead) {
+ this.state.tokens.push(new Token(this.state));
+ }
this.state.lastTokEnd = this.state.end;
this.state.lastTokStart = this.state.start;
@@ -84,11 +78,21 @@ export default class Tokenizer {
// TODO
+ isKeyword(word) {
+ return isKeyword(word);
+ }
+
+ // TODO
+
lookahead() {
- var old = this.state;
- this.state = old.clone();
+ let old = this.state;
+ this.state = old.clone(true);
+
+ this.isLookahead = true;
this.next();
- var curr = this.state.clone();
+ this.isLookahead = false;
+
+ let curr = this.state.clone(true);
this.state = old;
return curr;
}
@@ -97,7 +101,7 @@ export default class Tokenizer {
// pedantic tests (`"use strict"; 010;` should fail).
setStrict(strict) {
- this.strict = strict;
+ this.state.strict = strict;
if (!this.match(tt.num) && !this.match(tt.string)) return;
this.state.pos = this.state.start;
while (this.state.pos < this.state.lineStart) {
@@ -118,6 +122,8 @@ export default class Tokenizer {
let curContext = this.curContext();
if (!curContext || !curContext.preserveSpace) this.skipSpace();
+ this.state.containsOctal = false;
+ this.state.octalPosition = null;
this.state.start = this.state.pos;
this.state.startLoc = this.state.curPosition();
if (this.state.pos >= this.input.length) return this.finishToken(tt.eof);
@@ -132,10 +138,11 @@ export default class Tokenizer {
readToken(code) {
// Identifier or keyword. '\uXXXX' sequences are allowed in
// identifiers, so '\' also dispatches to that.
- if (isIdentifierStart(code, true) || code === 92 /* '\' */)
+ if (isIdentifierStart(code, true) || code === 92 /* '\' */) {
return this.readWord();
-
- return this.getTokenFromCode(code);
+ } else {
+ return this.getTokenFromCode(code);
+ }
}
fullCharCodeAtPos() {
@@ -147,17 +154,19 @@ export default class Tokenizer {
}
pushComment(block, text, start, end, startLoc, endLoc) {
- var comment = {
+ let comment = {
type: block ? "CommentBlock" : "CommentLine",
value: text,
start: start,
end: end,
- loc: new SourceLocation(startLoc, endLoc),
- range: [start, end]
+ loc: new SourceLocation(startLoc, endLoc)
};
- this.state.tokens.push(comment);
- this.state.comments.push(comment);
+ if (!this.isLookahead) {
+ this.state.tokens.push(comment);
+ this.state.comments.push(comment);
+ }
+
this.addComment(comment);
}
@@ -291,11 +300,11 @@ export default class Tokenizer {
}
readToken_mult_modulo(code) { // '%*'
- var type = code === 42 ? tt.star : tt.modulo;
- var width = 1;
- var next = this.input.charCodeAt(this.state.pos + 1);
+ let type = code === 42 ? tt.star : tt.modulo;
+ let width = 1;
+ let next = this.input.charCodeAt(this.state.pos + 1);
- if (next === 42 && this.options.features["es7.exponentiationOperator"]) { // '*'
+ if (next === 42 && this.hasPlugin("exponentiationOperator")) { // '*'
width++;
next = this.input.charCodeAt(this.state.pos + 2);
type = tt.exponent;
@@ -398,7 +407,7 @@ export default class Tokenizer {
case 125: ++this.state.pos; return this.finishToken(tt.braceR);
case 58:
- if (this.options.features["es7.functionBind"] && this.input.charCodeAt(this.state.pos + 1) === 58) {
+ if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
return this.finishOp(tt.doubleColon, 2);
} else {
++this.state.pos;
@@ -492,41 +501,13 @@ export default class Tokenizer {
// Need to use `readWord1` because '\uXXXX' sequences are allowed
// here (don't ask).
let mods = this.readWord1();
- let tmp = content;
if (mods) {
let validFlags = /^[gmsiyu]*$/;
if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag");
- if (mods.indexOf("u") >= 0 && !regexpUnicodeSupport) {
- // Replace each astral symbol and every Unicode escape sequence that
- // possibly represents an astral symbol or a paired surrogate with a
- // single ASCII symbol to avoid throwing on regular expressions that
- // are only valid in combination with the `/u` flag.
- // Note: replacing with the ASCII symbol `x` might cause false
- // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
- // perfectly valid pattern that is equivalent to `[a-b]`, but it would
- // be replaced by `[x-b]` which throws an error.
- tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, (match, code, offset) => {
- code = Number("0x" + code);
- if (code > 0x10FFFF) this.raise(start + offset + 3, "Code point out of bounds");
- return "x";
- });
- tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x");
- }
- }
- // Detect invalid regular expressions.
- let value = null;
- // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
- // so don't do detection if we are running under Rhino
- if (!isRhino) {
- tryCreateRegexp.call(this, tmp, undefined, start);
- // Get a regular expression object for this pattern-flag pair, or `null` in
- // case the current environment doesn't support the flags it uses.
- value = tryCreateRegexp.call(this, content, mods);
}
return this.finishToken(tt.regexp, {
pattern: content,
- flags: mods,
- value
+ flags: mods
});
}
@@ -589,7 +570,7 @@ export default class Tokenizer {
val = parseFloat(str);
} else if (!octal || str.length === 1) {
val = parseInt(str, 10);
- } else if (/[89]/.test(str) || this.strict) {
+ } else if (/[89]/.test(str) || this.state.strict) {
this.raise(start, "Invalid number");
} else {
val = parseInt(str, 8);
@@ -705,8 +686,14 @@ export default class Tokenizer {
octalStr = octalStr.slice(0, -1);
octal = parseInt(octalStr, 8);
}
- if (octal > 0 && (this.strict || inTemplate)) {
- this.raise(this.state.pos - 2, "Octal literal in strict mode");
+ if (octal > 0) {
+ if (!this.state.containsOctal) {
+ this.state.containsOctal = true;
+ this.state.octalPosition = this.state.pos - 2;
+ }
+ if (this.state.strict || inTemplate) {
+ this.raise(this.state.pos - 2, "Octal literal in strict mode");
+ }
}
this.state.pos += octalStr.length - 1;
return String.fromCharCode(octal);
@@ -769,8 +756,9 @@ export default class Tokenizer {
readWord() {
let word = this.readWord1();
let type = tt.name;
- if (!this.state.containsEsc && this.isKeyword(word))
+ if (!this.state.containsEsc && this.isKeyword(word)) {
type = keywordTypes[word];
+ }
return this.finishToken(type, word);
}
diff --git a/src/tokenizer/state.js b/src/tokenizer/state.js
index e609504bb2..63107de019 100644
--- a/src/tokenizer/state.js
+++ b/src/tokenizer/state.js
@@ -1,77 +1,139 @@
+/* @flow */
+
+import type { TokContext } from "./context";
+import type { Token } from "./index";
import { Position } from "../util/location";
import { types as ct } from "./context";
import { types as tt } from "./types";
export default class State {
- init(input) {
+ init(options: Object, input: string) {
+ this.strict = options.strictMode === false ? false : options.sourceType === "module";
+
this.input = input;
- // Used to signify the start of a potential arrow function
this.potentialArrowAt = -1;
- // Flags to track whether we are in a function, a generator.
- this.inFunction = this.inGenerator = false;
+ this.inMethod = this.inFunction = this.inGenerator = this.inAsync = false;
- // Labels in scope.
this.labels = [];
- // Leading decorators.
this.decorators = [];
- // Token store.
this.tokens = [];
- // Comment store.
this.comments = [];
- // Comment attachment store
this.trailingComments = [];
this.leadingComments = [];
this.commentStack = [];
- // The current position of the tokenizer in the input.
this.pos = this.lineStart = 0;
this.curLine = 1;
- // Properties of the current token:
- // Its type
this.type = tt.eof;
- // For tokens that include more information than their type, the value
this.value = null;
- // Its start and end offset
this.start = this.end = this.pos;
- // And, if locations are used, the {line, column} object
- // corresponding to those offsets
this.startLoc = this.endLoc = this.curPosition();
- // Position information for the previous token
this.lastTokEndLoc = this.lastTokStartLoc = null;
this.lastTokStart = this.lastTokEnd = this.pos;
- // The context stack is used to superficially track syntactic
- // context to predict whether a regular expression is allowed in a
- // given position.
this.context = [ct.b_stat];
this.exprAllowed = true;
- // Used to signal to callers of `readWord1` whether the word
- // contained any escape sequences. This is needed because words with
- // escape sequences must not be interpreted as keywords.
-
- this.containsEsc = false;
+ this.containsEsc = this.containsOctal = false;
+ this.octalPosition = null;
return this;
}
+ // TODO
+ strict: boolean;
+
+ // TODO
+ input: string;
+
+ // Used to signify the start of a potential arrow function
+ potentialArrowAt: number;
+
+ // Flags to track whether we are in a function, a generator.
+ inFunction: boolean;
+ inGenerator: boolean;
+ inMethod: boolean;
+
+ // Labels in scope.
+ labels: Array;
+
+ // Leading decorators.
+ decorators: Array;
+
+ // Token store.
+ tokens: Array;
+
+ // Comment store.
+ comments: Array;
+
+ // Comment attachment store
+ trailingComments: Array;
+ leadingComments: Array;
+ commentStack: Array;
+
+ // The current position of the tokenizer in the input.
+ pos: number;
+ lineStart: number;
+ curLine: number;
+
+ // Properties of the current token:
+ // Its type
+ type: Token;
+
+ // For tokens that include more information than their type, the value
+ value: any;
+
+ // Its start and end offset
+ start: number;
+ end: number;
+
+ // And, if locations are used, the {line, column} object
+ // corresponding to those offsets
+ startLoc: Position;
+ endLoc: Position;
+
+ // Position information for the previous token
+ lastTokEndLoc: ?Position;
+ lastTokStartLoc: ?Position;
+ lastTokStart: number;
+ lastTokEnd: number;
+
+ // The context stack is used to superficially track syntactic
+ // context to predict whether a regular expression is allowed in a
+ // given position.
+ context: Array;
+ exprAllowed: boolean;
+
+ // Used to signal to callers of `readWord1` whether the word
+ // contained any escape sequences. This is needed because words with
+ // escape sequences must not be interpreted as keywords.
+ containsEsc: boolean;
+
+ // TODO
+ containsOctal: boolean;
+ octalPosition: ?number;
+
curPosition() {
return new Position(this.curLine, this.pos - this.lineStart);
}
- clone() {
- var state = new State;
- for (var key in this) {
- var val = this[key];
- if (Array.isArray(val)) val = val.slice();
+ clone(skipArrays?) {
+ let state = new State;
+ for (let key in this) {
+ let val = this[key];
+
+ if ((!skipArrays || key === "context") && Array.isArray(val)) {
+ val = val.slice();
+ }
+
state[key] = val;
}
return state;
diff --git a/src/tokenizer/types.js b/src/tokenizer/types.js
index d64407e920..fa8ff99bab 100644
--- a/src/tokenizer/types.js
+++ b/src/tokenizer/types.js
@@ -1,3 +1,5 @@
+/* @flow */
+
// ## Token types
// The assignment of fine-grained, information-carrying type objects
@@ -113,7 +115,7 @@ kw("catch");
kw("continue");
kw("debugger");
kw("default", beforeExpr);
-kw("do", {isLoop: true});
+kw("do", {isLoop: true, beforeExpr: true});
kw("else", beforeExpr);
kw("finally");
kw("for", {isLoop: true});
diff --git a/src/util/identifier.js b/src/util/identifier.js
index 48847c6277..09045f8af0 100644
--- a/src/util/identifier.js
+++ b/src/util/identifier.js
@@ -1,3 +1,5 @@
+/* @flow */
+
// This is a trick taken from Esprima. It turns out that, on
// non-Chrome browsers, to check whether a string is in a set, a
// predicate containing a big ugly `switch` statement is faster than
@@ -47,7 +49,7 @@ nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
// offset starts at 0x10000, and each pair of numbers represents an
// offset to the next range, and then a size of the range. They were
// generated by tools/generate-identifier-regex.js
-var astralIdentifierStartCodes = [
+let astralIdentifierStartCodes = [
0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5,
7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30,
98, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14,
@@ -60,7 +62,7 @@ var astralIdentifierStartCodes = [
0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2,
4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 16355, 541
];
-var astralIdentifierCodes = [
+let astralIdentifierCodes = [
509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10,
54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10,
0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 9, 20855, 9, 135, 4, 60, 6,
diff --git a/src/util/location.js b/src/util/location.js
index 883d4b3daa..47019f1068 100644
--- a/src/util/location.js
+++ b/src/util/location.js
@@ -1,3 +1,5 @@
+/* @flow */
+
import { lineBreakG } from "./whitespace";
// These are used when `options.locations` is on, for the
diff --git a/src/util/whitespace.js b/src/util/whitespace.js
index d517d1f28a..78d800df7c 100644
--- a/src/util/whitespace.js
+++ b/src/util/whitespace.js
@@ -1,3 +1,5 @@
+/* @flow */
+
// Matches a whole line break (where CRLF is considered a single
// line break). Used to count lines.
diff --git a/test/fixtures/comments/basic/block-trailing-comment/expected.json b/test/fixtures/comments/basic/block-trailing-comment/expected.json
index e6e6b73fc4..f8f5e28599 100755
--- a/test/fixtures/comments/basic/block-trailing-comment/expected.json
+++ b/test/fixtures/comments/basic/block-trailing-comment/expected.json
@@ -104,17 +104,15 @@
"line": 3,
"column": 13
}
- },
- "range": [
- 15,
- 24
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -131,11 +129,7 @@
"line": 3,
"column": 13
}
- },
- "range": [
- 15,
- 24
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/comment-within-condition/expected.json b/test/fixtures/comments/basic/comment-within-condition/expected.json
index 3affb6e924..695fa34b10 100755
--- a/test/fixtures/comments/basic/comment-within-condition/expected.json
+++ b/test/fixtures/comments/basic/comment-within-condition/expected.json
@@ -72,11 +72,7 @@
"line": 2,
"column": 13
}
- },
- "range": [
- 14,
- 23
- ]
+ }
}
]
},
@@ -94,7 +90,8 @@
"column": 20
}
},
- "body": []
+ "body": [],
+ "directives": []
},
"alternate": null,
"leadingComments": [
@@ -112,15 +109,12 @@
"line": 1,
"column": 9
}
- },
- "range": [
- 0,
- 9
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -137,11 +131,7 @@
"line": 1,
"column": 9
}
- },
- "range": [
- 0,
- 9
- ]
+ }
},
{
"type": "CommentBlock",
@@ -157,11 +147,7 @@
"line": 2,
"column": 13
}
- },
- "range": [
- 14,
- 23
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/export-default-anonymous-class/expected.json b/test/fixtures/comments/basic/export-default-anonymous-class/expected.json
index fc2086aeee..e42c57b979 100755
--- a/test/fixtures/comments/basic/export-default-anonymous-class/expected.json
+++ b/test/fixtures/comments/basic/export-default-anonymous-class/expected.json
@@ -43,7 +43,7 @@
}
},
"declaration": {
- "type": "ClassExpression",
+ "type": "ClassDeclaration",
"start": 51,
"end": 121,
"loc": {
@@ -74,7 +74,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 103,
"end": 119,
"loc": {
@@ -107,40 +107,26 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 110,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 112,
"end": 119,
"loc": {
"start": {
"line": 8,
- "column": 11
+ "column": 13
},
"end": {
"line": 9,
"column": 5
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 112,
- "end": 119,
- "loc": {
- "start": {
- "line": 8,
- "column": 13
- },
- "end": {
- "line": 9,
- "column": 5
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
},
"leadingComments": [
{
@@ -157,11 +143,7 @@
"line": 7,
"column": 7
}
- },
- "range": [
- 63,
- 98
- ]
+ }
}
]
}
@@ -185,15 +167,12 @@
"line": 3,
"column": 3
}
- },
- "range": [
- 0,
- 35
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -210,11 +189,7 @@
"line": 3,
"column": 3
}
- },
- "range": [
- 0,
- 35
- ]
+ }
},
{
"type": "CommentBlock",
@@ -230,11 +205,7 @@
"line": 7,
"column": 7
}
- },
- "range": [
- 63,
- 98
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/surrounding-call-comments/expected.json b/test/fixtures/comments/basic/surrounding-call-comments/expected.json
index 2b2736473b..1b90fb89f0 100755
--- a/test/fixtures/comments/basic/surrounding-call-comments/expected.json
+++ b/test/fixtures/comments/basic/surrounding-call-comments/expected.json
@@ -139,11 +139,7 @@
"line": 2,
"column": 16
}
- },
- "range": [
- 19,
- 31
- ]
+ }
}
],
"trailingComments": [
@@ -161,18 +157,16 @@
"line": 4,
"column": 15
}
- },
- "range": [
- 47,
- 58
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -189,11 +183,7 @@
"line": 2,
"column": 16
}
- },
- "range": [
- 19,
- 31
- ]
+ }
},
{
"type": "CommentBlock",
@@ -209,11 +199,7 @@
"line": 4,
"column": 15
}
- },
- "range": [
- 47,
- 58
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/surrounding-debugger-comments/expected.json b/test/fixtures/comments/basic/surrounding-debugger-comments/expected.json
index 8eb698f9f3..76143585ee 100755
--- a/test/fixtures/comments/basic/surrounding-debugger-comments/expected.json
+++ b/test/fixtures/comments/basic/surrounding-debugger-comments/expected.json
@@ -105,11 +105,7 @@
"line": 2,
"column": 16
}
- },
- "range": [
- 19,
- 31
- ]
+ }
}
],
"trailingComments": [
@@ -127,18 +123,16 @@
"line": 4,
"column": 15
}
- },
- "range": [
- 50,
- 61
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -155,11 +149,7 @@
"line": 2,
"column": 16
}
- },
- "range": [
- 19,
- 31
- ]
+ }
},
{
"type": "CommentBlock",
@@ -175,11 +165,7 @@
"line": 4,
"column": 15
}
- },
- "range": [
- 50,
- 61
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/surrounding-return-comments/expected.json b/test/fixtures/comments/basic/surrounding-return-comments/expected.json
index 48dbc2e395..5ce003f2c5 100755
--- a/test/fixtures/comments/basic/surrounding-return-comments/expected.json
+++ b/test/fixtures/comments/basic/surrounding-return-comments/expected.json
@@ -106,11 +106,7 @@
"line": 2,
"column": 16
}
- },
- "range": [
- 19,
- 31
- ]
+ }
}
],
"trailingComments": [
@@ -128,18 +124,16 @@
"line": 4,
"column": 15
}
- },
- "range": [
- 48,
- 59
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -156,11 +150,7 @@
"line": 2,
"column": 16
}
- },
- "range": [
- 19,
- 31
- ]
+ }
},
{
"type": "CommentBlock",
@@ -176,11 +166,7 @@
"line": 4,
"column": 15
}
- },
- "range": [
- 48,
- 59
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/surrounding-throw-comments/expected.json b/test/fixtures/comments/basic/surrounding-throw-comments/expected.json
index 1d43e1eea5..30e63041bc 100755
--- a/test/fixtures/comments/basic/surrounding-throw-comments/expected.json
+++ b/test/fixtures/comments/basic/surrounding-throw-comments/expected.json
@@ -91,7 +91,7 @@
}
},
"argument": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 42,
"end": 44,
"loc": {
@@ -104,9 +104,11 @@
"column": 12
}
},
+ "extra": {
+ "rawValue": 55,
+ "raw": "55"
+ },
"value": 55,
- "rawValue": 55,
- "raw": "55",
"leadingComments": null
},
"leadingComments": [
@@ -124,11 +126,7 @@
"line": 2,
"column": 16
}
- },
- "range": [
- 19,
- 31
- ]
+ }
}
],
"trailingComments": [
@@ -146,18 +144,16 @@
"line": 4,
"column": 15
}
- },
- "range": [
- 50,
- 61
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -174,11 +170,7 @@
"line": 2,
"column": 16
}
- },
- "range": [
- 19,
- 31
- ]
+ }
},
{
"type": "CommentBlock",
@@ -194,11 +186,7 @@
"line": 4,
"column": 15
}
- },
- "range": [
- 50,
- 61
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json b/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json
index c749fccc76..d2805cc6ab 100755
--- a/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json
+++ b/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json
@@ -91,7 +91,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 37,
"end": 41,
"loc": {
@@ -105,8 +105,6 @@
}
},
"value": true,
- "rawValue": true,
- "raw": "true",
"leadingComments": null
},
"body": {
@@ -124,6 +122,7 @@
}
},
"body": [],
+ "directives": [],
"leadingComments": null,
"trailingComments": null
},
@@ -142,11 +141,7 @@
"line": 1,
"column": 29
}
- },
- "range": [
- 15,
- 29
- ]
+ }
}
],
"trailingComments": [
@@ -164,11 +159,7 @@
"line": 1,
"column": 56
}
- },
- "range": [
- 47,
- 56
- ]
+ }
}
]
},
@@ -238,18 +229,16 @@
"line": 1,
"column": 56
}
- },
- "range": [
- 47,
- 56
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -266,11 +255,7 @@
"line": 1,
"column": 29
}
- },
- "range": [
- 15,
- 29
- ]
+ }
},
{
"type": "CommentBlock",
@@ -286,11 +271,7 @@
"line": 1,
"column": 56
}
- },
- "range": [
- 47,
- 56
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json b/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json
index c53e024530..579ef06c90 100755
--- a/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json
+++ b/test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json
@@ -140,7 +140,7 @@
},
"consequent": [],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 66,
"end": 67,
"loc": {
@@ -153,9 +153,11 @@
"column": 14
}
},
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
"value": 1,
- "rawValue": 1,
- "raw": "1",
"leadingComments": null
},
"leadingComments": [
@@ -173,11 +175,7 @@
"line": 3,
"column": 14
}
- },
- "range": [
- 46,
- 52
- ]
+ }
}
],
"trailingComments": [
@@ -195,11 +193,7 @@
"line": 5,
"column": 28
}
- },
- "range": [
- 81,
- 97
- ]
+ }
}
]
},
@@ -267,7 +261,7 @@
}
],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 111,
"end": 112,
"loc": {
@@ -280,9 +274,11 @@
"column": 14
}
},
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
"value": 2,
- "rawValue": 2,
- "raw": "2",
"leadingComments": null
},
"leadingComments": [
@@ -300,20 +296,18 @@
"line": 5,
"column": 28
}
- },
- "range": [
- 81,
- 97
- ]
+ }
}
]
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -330,11 +324,7 @@
"line": 3,
"column": 14
}
- },
- "range": [
- 46,
- 52
- ]
+ }
},
{
"type": "CommentLine",
@@ -350,11 +340,7 @@
"line": 5,
"column": 28
}
- },
- "range": [
- 81,
- 97
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json b/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json
index 7bd86859b4..444961e833 100755
--- a/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json
+++ b/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json
@@ -75,7 +75,7 @@
},
"consequent": [],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 34,
"end": 35,
"loc": {
@@ -88,9 +88,11 @@
"column": 10
}
},
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
"value": 1,
- "rawValue": 1,
- "raw": "1",
"leadingComments": null
},
"leadingComments": [
@@ -108,11 +110,7 @@
"line": 2,
"column": 10
}
- },
- "range": [
- 18,
- 24
- ]
+ }
}
],
"trailingComments": [
@@ -130,11 +128,7 @@
"line": 4,
"column": 24
}
- },
- "range": [
- 45,
- 61
- ]
+ }
}
]
},
@@ -202,7 +196,7 @@
}
],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 71,
"end": 72,
"loc": {
@@ -215,9 +209,11 @@
"column": 10
}
},
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
"value": 2,
- "rawValue": 2,
- "raw": "2",
"leadingComments": null
},
"leadingComments": [
@@ -235,17 +231,14 @@
"line": 4,
"column": 24
}
- },
- "range": [
- 45,
- 61
- ]
+ }
}
]
}
]
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -262,11 +255,7 @@
"line": 2,
"column": 10
}
- },
- "range": [
- 18,
- 24
- ]
+ }
},
{
"type": "CommentLine",
@@ -282,11 +271,7 @@
"line": 4,
"column": 24
}
- },
- "range": [
- 45,
- 61
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json b/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json
index e01a3fd11c..09580d701c 100755
--- a/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json
+++ b/test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json
@@ -157,7 +157,7 @@
}
],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 48,
"end": 49,
"loc": {
@@ -170,9 +170,11 @@
"column": 14
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
},
{
@@ -210,7 +212,7 @@
}
],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 83,
"end": 84,
"loc": {
@@ -223,9 +225,11 @@
"column": 14
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
"trailingComments": [
{
@@ -242,20 +246,18 @@
"line": 7,
"column": 20
}
- },
- "range": [
- 113,
- 125
- ]
+ }
}
]
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -272,11 +274,7 @@
"line": 7,
"column": 20
}
- },
- "range": [
- 113,
- 125
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json b/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json
index 2dbbec6d67..2b830fd901 100755
--- a/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json
+++ b/test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json
@@ -501,7 +501,7 @@
},
"operator": "-",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 215,
"end": 216,
"loc": {
@@ -514,9 +514,11 @@
"column": 78
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
},
"computed": true
@@ -527,7 +529,7 @@
}
],
"test": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 116,
"end": 136,
"loc": {
@@ -540,9 +542,11 @@
"column": 37
}
},
- "value": "SequenceExpression",
- "rawValue": "SequenceExpression",
- "raw": "\"SequenceExpression\""
+ "extra": {
+ "rawValue": "SequenceExpression",
+ "raw": "\"SequenceExpression\""
+ },
+ "value": "SequenceExpression"
},
"trailingComments": [
{
@@ -559,11 +563,7 @@
"line": 7,
"column": 25
}
- },
- "range": [
- 232,
- 245
- ]
+ }
}
]
}
@@ -584,7 +584,7 @@
}
},
"argument": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 271,
"end": 276,
"loc": {
@@ -598,8 +598,6 @@
}
},
"value": false,
- "rawValue": false,
- "raw": "false",
"leadingComments": null
},
"leadingComments": [
@@ -617,23 +615,22 @@
"line": 7,
"column": 25
}
- },
- "range": [
- 232,
- 245
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
}
}
}
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -650,11 +647,7 @@
"line": 7,
"column": 25
}
- },
- "range": [
- 232,
- 245
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/comments/basic/switch-no-default-comment/expected.json b/test/fixtures/comments/basic/switch-no-default-comment/expected.json
index a895f6dde3..0a65969bf1 100755
--- a/test/fixtures/comments/basic/switch-no-default-comment/expected.json
+++ b/test/fixtures/comments/basic/switch-no-default-comment/expected.json
@@ -94,7 +94,7 @@
}
],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 22,
"end": 23,
"loc": {
@@ -107,9 +107,11 @@
"column": 10
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
"trailingComments": [
{
@@ -126,17 +128,14 @@
"line": 4,
"column": 16
}
- },
- "range": [
- 44,
- 56
- ]
+ }
}
]
}
]
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -153,11 +152,7 @@
"line": 4,
"column": 16
}
- },
- "range": [
- 44,
- 56
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/core/categorized/regex-after-block/expected.json b/test/fixtures/core/categorized/regex-after-block/expected.json
index 9865ab3100..545b21ce2e 100644
--- a/test/fixtures/core/categorized/regex-after-block/expected.json
+++ b/test/fixtures/core/categorized/regex-after-block/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 4,
"end": 8,
"loc": {
@@ -56,9 +56,7 @@
"column": 8
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"consequent": {
"type": "BlockStatement",
@@ -74,7 +72,8 @@
"column": 1
}
},
- "body": []
+ "body": [],
+ "directives": []
},
"alternate": null
},
@@ -93,7 +92,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 15,
"end": 20,
"loc": {
@@ -106,13 +105,14 @@
"column": 5
}
},
- "raw": "/foo/",
- "regex": {
- "pattern": "foo",
- "flags": ""
- }
+ "extra": {
+ "raw": "/foo/"
+ },
+ "pattern": "foo",
+ "flags": ""
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/542/actual.js b/test/fixtures/core/uncategorised/.542/actual.js
similarity index 100%
rename from test/fixtures/core/uncategorised/542/actual.js
rename to test/fixtures/core/uncategorised/.542/actual.js
diff --git a/test/fixtures/core/uncategorised/542/options.json b/test/fixtures/core/uncategorised/.542/options.json
similarity index 100%
rename from test/fixtures/core/uncategorised/542/options.json
rename to test/fixtures/core/uncategorised/.542/options.json
diff --git a/test/fixtures/core/uncategorised/543/actual.js b/test/fixtures/core/uncategorised/.543/actual.js
similarity index 100%
rename from test/fixtures/core/uncategorised/543/actual.js
rename to test/fixtures/core/uncategorised/.543/actual.js
diff --git a/test/fixtures/core/uncategorised/543/options.json b/test/fixtures/core/uncategorised/.543/options.json
similarity index 100%
rename from test/fixtures/core/uncategorised/543/options.json
rename to test/fixtures/core/uncategorised/.543/options.json
diff --git a/test/fixtures/core/uncategorised/544/actual.js b/test/fixtures/core/uncategorised/.544/actual.js
similarity index 100%
rename from test/fixtures/core/uncategorised/544/actual.js
rename to test/fixtures/core/uncategorised/.544/actual.js
diff --git a/test/fixtures/core/uncategorised/544/options.json b/test/fixtures/core/uncategorised/.544/options.json
similarity index 100%
rename from test/fixtures/core/uncategorised/544/options.json
rename to test/fixtures/core/uncategorised/.544/options.json
diff --git a/test/fixtures/core/uncategorised/10/expected.json b/test/fixtures/core/uncategorised/10/expected.json
index 61f7bde252..d10391f23b 100644
--- a/test/fixtures/core/uncategorised/10/expected.json
+++ b/test/fixtures/core/uncategorised/10/expected.json
@@ -89,7 +89,7 @@
},
"elements": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 8,
"loc": {
@@ -102,14 +102,17 @@
"column": 8
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/100/expected.json b/test/fixtures/core/uncategorised/100/expected.json
index aaafd737c7..4b1cc3a85b 100644
--- a/test/fixtures/core/uncategorised/100/expected.json
+++ b/test/fixtures/core/uncategorised/100/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 14,
"loc": {
@@ -42,8 +43,8 @@
"column": 6
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 14,
"loc": {
@@ -56,9 +57,11 @@
"column": 6
}
},
- "value": "Helloworld",
- "rawValue": "Helloworld",
- "raw": "\"Hello\\\nworld\""
+ "value": "Hello\\\nworld",
+ "extra": {
+ "raw": "\"Hello\\\nworld\"",
+ "rawValue": "Hello\\\nworld"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/101/expected.json b/test/fixtures/core/uncategorised/101/expected.json
index bea6bba9b2..aade1ae44b 100644
--- a/test/fixtures/core/uncategorised/101/expected.json
+++ b/test/fixtures/core/uncategorised/101/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 14,
"loc": {
@@ -42,8 +43,8 @@
"column": 14
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 14,
"loc": {
@@ -56,9 +57,11 @@
"column": 14
}
},
- "value": "Hello\u0001World",
- "rawValue": "Hello\u0001World",
- "raw": "\"Hello\\1World\""
+ "value": "Hello\\1World",
+ "extra": {
+ "raw": "\"Hello\\1World\"",
+ "rawValue": "Hello\\1World"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/102/expected.json b/test/fixtures/core/uncategorised/102/expected.json
index 009a9e4ed5..46f8894ef5 100644
--- a/test/fixtures/core/uncategorised/102/expected.json
+++ b/test/fixtures/core/uncategorised/102/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 8,
"end": 16,
"loc": {
@@ -87,16 +87,17 @@
"column": 16
}
},
- "raw": "/[a-z]/i",
- "regex": {
- "pattern": "[a-z]",
- "flags": "i"
- }
+ "extra": {
+ "raw": "/[a-z]/i"
+ },
+ "pattern": "[a-z]",
+ "flags": "i"
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/103/expected.json b/test/fixtures/core/uncategorised/103/expected.json
index ed4fe7cded..c44951e7c8 100644
--- a/test/fixtures/core/uncategorised/103/expected.json
+++ b/test/fixtures/core/uncategorised/103/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 8,
"end": 16,
"loc": {
@@ -87,16 +87,17 @@
"column": 16
}
},
- "raw": "/[x-z]/i",
- "regex": {
- "pattern": "[x-z]",
- "flags": "i"
- }
+ "extra": {
+ "raw": "/[x-z]/i"
+ },
+ "pattern": "[x-z]",
+ "flags": "i"
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/104/expected.json b/test/fixtures/core/uncategorised/104/expected.json
index b9f26b24b0..08a395e815 100644
--- a/test/fixtures/core/uncategorised/104/expected.json
+++ b/test/fixtures/core/uncategorised/104/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 8,
"end": 16,
"loc": {
@@ -87,16 +87,17 @@
"column": 16
}
},
- "raw": "/[a-c]/i",
- "regex": {
- "pattern": "[a-c]",
- "flags": "i"
- }
+ "extra": {
+ "raw": "/[a-c]/i"
+ },
+ "pattern": "[a-c]",
+ "flags": "i"
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/105/expected.json b/test/fixtures/core/uncategorised/105/expected.json
index 9a938ecee4..45afd2c5db 100644
--- a/test/fixtures/core/uncategorised/105/expected.json
+++ b/test/fixtures/core/uncategorised/105/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 8,
"end": 17,
"loc": {
@@ -87,16 +87,17 @@
"column": 17
}
},
- "raw": "/[P QR]/i",
- "regex": {
- "pattern": "[P QR]",
- "flags": "i"
- }
+ "extra": {
+ "raw": "/[P QR]/i"
+ },
+ "pattern": "[P QR]",
+ "flags": "i"
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/106/expected.json b/test/fixtures/core/uncategorised/106/expected.json
index 25323deabf..80c40e93c1 100644
--- a/test/fixtures/core/uncategorised/106/expected.json
+++ b/test/fixtures/core/uncategorised/106/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 8,
"end": 18,
"loc": {
@@ -87,16 +87,17 @@
"column": 18
}
},
- "raw": "/foo\\/bar/",
- "regex": {
- "pattern": "foo\\/bar",
- "flags": ""
- }
+ "extra": {
+ "raw": "/foo\\/bar/"
+ },
+ "pattern": "foo\\/bar",
+ "flags": ""
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/107/expected.json b/test/fixtures/core/uncategorised/107/expected.json
index 85f4f1e155..c2c4cdcbb1 100644
--- a/test/fixtures/core/uncategorised/107/expected.json
+++ b/test/fixtures/core/uncategorised/107/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 8,
"end": 21,
"loc": {
@@ -87,16 +87,17 @@
"column": 21
}
},
- "raw": "/=([^=\\s])+/g",
- "regex": {
- "pattern": "=([^=\\s])+",
- "flags": "g"
- }
+ "extra": {
+ "raw": "/=([^=\\s])+/g"
+ },
+ "pattern": "=([^=\\s])+",
+ "flags": "g"
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/108/expected.json b/test/fixtures/core/uncategorised/108/expected.json
index d37baa6dd8..726e72aa5b 100644
--- a/test/fixtures/core/uncategorised/108/expected.json
+++ b/test/fixtures/core/uncategorised/108/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 8,
"end": 22,
"loc": {
@@ -87,16 +87,17 @@
"column": 22
}
},
- "raw": "/[P QR]/\\u0067",
- "regex": {
- "pattern": "[P QR]",
- "flags": "g"
- }
+ "extra": {
+ "raw": "/[P QR]/\\u0067"
+ },
+ "pattern": "[P QR]",
+ "flags": "g"
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/11/expected.json b/test/fixtures/core/uncategorised/11/expected.json
index 3eecd02bc8..4c7a7a3493 100644
--- a/test/fixtures/core/uncategorised/11/expected.json
+++ b/test/fixtures/core/uncategorised/11/expected.json
@@ -91,7 +91,7 @@
null,
null,
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 9,
"end": 11,
"loc": {
@@ -104,14 +104,17 @@
"column": 11
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/116/expected.json b/test/fixtures/core/uncategorised/116/expected.json
index b353ef2c83..5e0c9c3c30 100644
--- a/test/fixtures/core/uncategorised/116/expected.json
+++ b/test/fixtures/core/uncategorised/116/expected.json
@@ -101,7 +101,9 @@
"name": "foo"
},
"arguments": [],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
},
"property": {
"type": "Identifier",
@@ -124,6 +126,7 @@
"arguments": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/118/expected.json b/test/fixtures/core/uncategorised/118/expected.json
index 6105d2841a..2a92530d73 100644
--- a/test/fixtures/core/uncategorised/118/expected.json
+++ b/test/fixtures/core/uncategorised/118/expected.json
@@ -71,11 +71,14 @@
}
},
"name": "foo",
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
},
"arguments": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/12/expected.json b/test/fixtures/core/uncategorised/12/expected.json
index e41172db76..5405d8164c 100644
--- a/test/fixtures/core/uncategorised/12/expected.json
+++ b/test/fixtures/core/uncategorised/12/expected.json
@@ -89,7 +89,7 @@
},
"elements": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 7,
"loc": {
@@ -102,12 +102,14 @@
"column": 7
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 9,
"end": 10,
"loc": {
@@ -120,12 +122,14 @@
"column": 10
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
},
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 13,
"loc": {
@@ -138,14 +142,17 @@
"column": 13
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/124/expected.json b/test/fixtures/core/uncategorised/124/expected.json
index cca9b0fc82..ec68a20ef6 100644
--- a/test/fixtures/core/uncategorised/124/expected.json
+++ b/test/fixtures/core/uncategorised/124/expected.json
@@ -87,7 +87,7 @@
"name": "universe"
},
"property": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 9,
"end": 11,
"loc": {
@@ -100,9 +100,11 @@
"column": 11
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
},
"computed": true
},
@@ -125,6 +127,7 @@
"computed": false
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/125/expected.json b/test/fixtures/core/uncategorised/125/expected.json
index 463a77c2e5..a7a9ccf384 100644
--- a/test/fixtures/core/uncategorised/125/expected.json
+++ b/test/fixtures/core/uncategorised/125/expected.json
@@ -88,7 +88,7 @@
},
"arguments": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 9,
"end": 11,
"loc": {
@@ -101,9 +101,11 @@
"column": 11
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
]
},
@@ -126,6 +128,7 @@
"computed": false
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/126/expected.json b/test/fixtures/core/uncategorised/126/expected.json
index fab1521321..c94c04107e 100644
--- a/test/fixtures/core/uncategorised/126/expected.json
+++ b/test/fixtures/core/uncategorised/126/expected.json
@@ -116,7 +116,7 @@
},
"arguments": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 9,
"end": 11,
"loc": {
@@ -129,9 +129,11 @@
"column": 11
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
]
},
@@ -155,7 +157,7 @@
},
"arguments": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 22,
"end": 24,
"loc": {
@@ -168,12 +170,14 @@
"column": 24
}
},
- "value": 14,
- "rawValue": 14,
- "raw": "14"
+ "extra": {
+ "rawValue": 14,
+ "raw": "14"
+ },
+ "value": 14
},
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 26,
"end": 27,
"loc": {
@@ -186,12 +190,14 @@
"column": 27
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
},
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 29,
"end": 31,
"loc": {
@@ -204,9 +210,11 @@
"column": 31
}
},
- "value": 77,
- "rawValue": 77,
- "raw": "77"
+ "extra": {
+ "rawValue": 77,
+ "raw": "77"
+ },
+ "value": 77
}
]
},
@@ -229,6 +237,7 @@
"computed": false
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/127/expected.json b/test/fixtures/core/uncategorised/127/expected.json
index 762a4f980c..b7649d92f8 100644
--- a/test/fixtures/core/uncategorised/127/expected.json
+++ b/test/fixtures/core/uncategorised/127/expected.json
@@ -170,7 +170,7 @@
},
"arguments": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 40,
"end": 44,
"loc": {
@@ -183,13 +183,16 @@
"column": 44
}
},
- "value": 2014,
- "rawValue": 2014,
- "raw": "2014"
+ "extra": {
+ "rawValue": 2014,
+ "raw": "2014"
+ },
+ "value": 2014
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/13/expected.json b/test/fixtures/core/uncategorised/13/expected.json
index df8bef639b..f8e8558451 100644
--- a/test/fixtures/core/uncategorised/13/expected.json
+++ b/test/fixtures/core/uncategorised/13/expected.json
@@ -89,7 +89,7 @@
},
"elements": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 7,
"loc": {
@@ -102,12 +102,14 @@
"column": 7
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 9,
"end": 10,
"loc": {
@@ -120,13 +122,15 @@
"column": 10
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
},
null,
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 13,
"end": 14,
"loc": {
@@ -139,14 +143,17 @@
"column": 14
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/197/expected.json b/test/fixtures/core/uncategorised/197/expected.json
index 355a73a1ad..0ae6562f5f 100644
--- a/test/fixtures/core/uncategorised/197/expected.json
+++ b/test/fixtures/core/uncategorised/197/expected.json
@@ -73,7 +73,7 @@
"name": "y"
},
"consequent": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 4,
"end": 5,
"loc": {
@@ -86,12 +86,14 @@
"column": 5
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
"alternate": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 9,
"loc": {
@@ -104,12 +106,15 @@
"column": 9
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/198/expected.json b/test/fixtures/core/uncategorised/198/expected.json
index 618615ef5f..5f5e161e69 100644
--- a/test/fixtures/core/uncategorised/198/expected.json
+++ b/test/fixtures/core/uncategorised/198/expected.json
@@ -105,7 +105,7 @@
}
},
"consequent": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 9,
"end": 10,
"loc": {
@@ -118,12 +118,14 @@
"column": 10
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
"alternate": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 13,
"end": 14,
"loc": {
@@ -136,12 +138,15 @@
"column": 14
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/199/expected.json b/test/fixtures/core/uncategorised/199/expected.json
index dcfe85d992..c55cb13771 100644
--- a/test/fixtures/core/uncategorised/199/expected.json
+++ b/test/fixtures/core/uncategorised/199/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 4,
"end": 6,
"loc": {
@@ -87,12 +87,15 @@
"column": 6
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/2/expected.json b/test/fixtures/core/uncategorised/2/expected.json
index 62806e9393..9ca3c11021 100644
--- a/test/fixtures/core/uncategorised/2/expected.json
+++ b/test/fixtures/core/uncategorised/2/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NullLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -55,10 +55,7 @@
"line": 1,
"column": 4
}
- },
- "value": null,
- "rawValue": null,
- "raw": "null"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/200/expected.json b/test/fixtures/core/uncategorised/200/expected.json
index 32e9683fad..ccef73317a 100644
--- a/test/fixtures/core/uncategorised/200/expected.json
+++ b/test/fixtures/core/uncategorised/200/expected.json
@@ -74,7 +74,7 @@
"name": "eval"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 7,
"end": 9,
"loc": {
@@ -87,12 +87,15 @@
"column": 9
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/201/expected.json b/test/fixtures/core/uncategorised/201/expected.json
index aadc603158..90279da775 100644
--- a/test/fixtures/core/uncategorised/201/expected.json
+++ b/test/fixtures/core/uncategorised/201/expected.json
@@ -74,7 +74,7 @@
"name": "arguments"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 14,
"loc": {
@@ -87,12 +87,15 @@
"column": 14
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/202/expected.json b/test/fixtures/core/uncategorised/202/expected.json
index c68b13b4a8..8c50cdf2f0 100644
--- a/test/fixtures/core/uncategorised/202/expected.json
+++ b/test/fixtures/core/uncategorised/202/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 7,
"loc": {
@@ -87,12 +87,15 @@
"column": 7
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/203/expected.json b/test/fixtures/core/uncategorised/203/expected.json
index 2a2e320c76..6c210fd1b6 100644
--- a/test/fixtures/core/uncategorised/203/expected.json
+++ b/test/fixtures/core/uncategorised/203/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 7,
"loc": {
@@ -87,12 +87,15 @@
"column": 7
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/204/expected.json b/test/fixtures/core/uncategorised/204/expected.json
index f61cd91960..2c333b70e1 100644
--- a/test/fixtures/core/uncategorised/204/expected.json
+++ b/test/fixtures/core/uncategorised/204/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 7,
"loc": {
@@ -87,12 +87,15 @@
"column": 7
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/205/expected.json b/test/fixtures/core/uncategorised/205/expected.json
index d87bd7221e..53c21fe4d6 100644
--- a/test/fixtures/core/uncategorised/205/expected.json
+++ b/test/fixtures/core/uncategorised/205/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 7,
"loc": {
@@ -87,12 +87,15 @@
"column": 7
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/206/expected.json b/test/fixtures/core/uncategorised/206/expected.json
index 58ac4f76d5..abc4cb0406 100644
--- a/test/fixtures/core/uncategorised/206/expected.json
+++ b/test/fixtures/core/uncategorised/206/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 7,
"loc": {
@@ -87,12 +87,15 @@
"column": 7
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/207/expected.json b/test/fixtures/core/uncategorised/207/expected.json
index 6aec1fd6ae..3c8c2893e8 100644
--- a/test/fixtures/core/uncategorised/207/expected.json
+++ b/test/fixtures/core/uncategorised/207/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 8,
"loc": {
@@ -87,12 +87,15 @@
"column": 8
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/208/expected.json b/test/fixtures/core/uncategorised/208/expected.json
index 2afa7f1ab0..cfa8f98dfa 100644
--- a/test/fixtures/core/uncategorised/208/expected.json
+++ b/test/fixtures/core/uncategorised/208/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 8,
"loc": {
@@ -87,12 +87,15 @@
"column": 8
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/209/expected.json b/test/fixtures/core/uncategorised/209/expected.json
index 34ae7fde25..ff6f9db71d 100644
--- a/test/fixtures/core/uncategorised/209/expected.json
+++ b/test/fixtures/core/uncategorised/209/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 7,
"end": 9,
"loc": {
@@ -87,12 +87,15 @@
"column": 9
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/210/expected.json b/test/fixtures/core/uncategorised/210/expected.json
index a97d4cb79e..3719a7fafe 100644
--- a/test/fixtures/core/uncategorised/210/expected.json
+++ b/test/fixtures/core/uncategorised/210/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 7,
"loc": {
@@ -87,12 +87,15 @@
"column": 7
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/211/expected.json b/test/fixtures/core/uncategorised/211/expected.json
index 7a092cae1b..84a3e7d56e 100644
--- a/test/fixtures/core/uncategorised/211/expected.json
+++ b/test/fixtures/core/uncategorised/211/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 7,
"loc": {
@@ -87,12 +87,15 @@
"column": 7
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/212/expected.json b/test/fixtures/core/uncategorised/212/expected.json
index 0c297787a4..456765cc37 100644
--- a/test/fixtures/core/uncategorised/212/expected.json
+++ b/test/fixtures/core/uncategorised/212/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 7,
"loc": {
@@ -87,12 +87,15 @@
"column": 7
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/218/expected.json b/test/fixtures/core/uncategorised/218/expected.json
index a5b0f49382..1050401744 100644
--- a/test/fixtures/core/uncategorised/218/expected.json
+++ b/test/fixtures/core/uncategorised/218/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -87,14 +87,17 @@
"column": 10
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/219/expected.json b/test/fixtures/core/uncategorised/219/expected.json
index 6ed6cc90fa..a1ed3e4b37 100644
--- a/test/fixtures/core/uncategorised/219/expected.json
+++ b/test/fixtures/core/uncategorised/219/expected.json
@@ -74,7 +74,7 @@
"name": "eval"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 11,
"end": 13,
"loc": {
@@ -87,9 +87,11 @@
"column": 13
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
},
{
@@ -123,7 +125,7 @@
"name": "arguments"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 27,
"end": 29,
"loc": {
@@ -136,14 +138,17 @@
"column": 29
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/22/expected.json b/test/fixtures/core/uncategorised/22/expected.json
index e737e4bf96..f0a884e6c3 100644
--- a/test/fixtures/core/uncategorised/22/expected.json
+++ b/test/fixtures/core/uncategorised/22/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 16,
"loc": {
@@ -122,7 +122,7 @@
"name": "answer"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 14,
"end": 16,
"loc": {
@@ -135,16 +135,18 @@
"column": 16
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/220/expected.json b/test/fixtures/core/uncategorised/220/expected.json
index 6b9e9e3f3a..db6e0fba4c 100644
--- a/test/fixtures/core/uncategorised/220/expected.json
+++ b/test/fixtures/core/uncategorised/220/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -87,9 +87,11 @@
"column": 10
}
},
- "value": 14,
- "rawValue": 14,
- "raw": "14"
+ "extra": {
+ "rawValue": 14,
+ "raw": "14"
+ },
+ "value": 14
}
},
{
@@ -123,7 +125,7 @@
"name": "y"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 16,
"end": 17,
"loc": {
@@ -136,9 +138,11 @@
"column": 17
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
}
},
{
@@ -172,7 +176,7 @@
"name": "z"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 23,
"end": 27,
"loc": {
@@ -185,14 +189,17 @@
"column": 27
}
},
- "value": 1977,
- "rawValue": 1977,
- "raw": "1977"
+ "extra": {
+ "rawValue": 1977,
+ "raw": "1977"
+ },
+ "value": 1977
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/229/expected.json b/test/fixtures/core/uncategorised/229/expected.json
index 97e2c0b335..640c5691c2 100644
--- a/test/fixtures/core/uncategorised/229/expected.json
+++ b/test/fixtures/core/uncategorised/229/expected.json
@@ -104,13 +104,17 @@
"column": 26
}
},
- "body": []
+ "body": [],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
},
"alternate": null
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/23/expected.json b/test/fixtures/core/uncategorised/23/expected.json
index b7e5bc565e..dd3a42f49d 100644
--- a/test/fixtures/core/uncategorised/23/expected.json
+++ b/test/fixtures/core/uncategorised/23/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 12,
"loc": {
@@ -122,7 +122,7 @@
"name": "if"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 12,
"loc": {
@@ -135,16 +135,18 @@
"column": 12
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/230/expected.json b/test/fixtures/core/uncategorised/230/expected.json
index c1930814e6..02fd006838 100644
--- a/test/fixtures/core/uncategorised/230/expected.json
+++ b/test/fixtures/core/uncategorised/230/expected.json
@@ -104,7 +104,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 21,
"end": 22,
"loc": {
@@ -117,9 +117,11 @@
"column": 22
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
}
],
@@ -127,6 +129,7 @@
},
"alternate": null
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/232/expected.json b/test/fixtures/core/uncategorised/232/expected.json
index a065c54055..52f64a4d6b 100644
--- a/test/fixtures/core/uncategorised/232/expected.json
+++ b/test/fixtures/core/uncategorised/232/expected.json
@@ -90,7 +90,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 18,
"end": 22,
"loc": {
@@ -103,11 +103,10 @@
"column": 22
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/233/expected.json b/test/fixtures/core/uncategorised/233/expected.json
index bcc441a257..04998adb58 100644
--- a/test/fixtures/core/uncategorised/233/expected.json
+++ b/test/fixtures/core/uncategorised/233/expected.json
@@ -90,7 +90,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 18,
"end": 22,
"loc": {
@@ -103,11 +103,10 @@
"column": 22
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/234/expected.json b/test/fixtures/core/uncategorised/234/expected.json
index 09c2e86050..8e9ac0c09e 100644
--- a/test/fixtures/core/uncategorised/234/expected.json
+++ b/test/fixtures/core/uncategorised/234/expected.json
@@ -153,7 +153,8 @@
}
}
}
- ]
+ ],
+ "directives": []
},
"test": {
"type": "BinaryExpression",
@@ -187,7 +188,7 @@
},
"operator": "<",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 28,
"end": 30,
"loc": {
@@ -200,12 +201,15 @@
"column": 30
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/235/expected.json b/test/fixtures/core/uncategorised/235/expected.json
index 2333bd0d07..e012c017fe 100644
--- a/test/fixtures/core/uncategorised/235/expected.json
+++ b/test/fixtures/core/uncategorised/235/expected.json
@@ -71,10 +71,11 @@
"column": 8
}
},
- "body": []
+ "body": [],
+ "directives": []
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 16,
"end": 21,
"loc": {
@@ -87,9 +88,7 @@
"column": 21
}
},
- "value": false,
- "rawValue": false,
- "raw": "false"
+ "value": false
}
},
{
@@ -107,7 +106,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 23,
"end": 28,
"loc": {
@@ -120,13 +119,13 @@
"column": 28
}
},
- "value": false,
- "rawValue": false,
- "raw": "false"
+ "value": false
}
}
- ]
+ ],
+ "directives": []
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/236/expected.json b/test/fixtures/core/uncategorised/236/expected.json
index e3ddda1e17..b154f386f7 100644
--- a/test/fixtures/core/uncategorised/236/expected.json
+++ b/test/fixtures/core/uncategorised/236/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 7,
"end": 11,
"loc": {
@@ -56,9 +56,7 @@
"column": 11
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "ExpressionStatement",
@@ -108,6 +106,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/237/expected.json b/test/fixtures/core/uncategorised/237/expected.json
index bf0cf79afd..0ca7f0f400 100644
--- a/test/fixtures/core/uncategorised/237/expected.json
+++ b/test/fixtures/core/uncategorised/237/expected.json
@@ -74,7 +74,7 @@
},
"operator": "<",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 11,
"end": 13,
"loc": {
@@ -87,9 +87,11 @@
"column": 13
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
},
"body": {
@@ -203,9 +205,11 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/24/expected.json b/test/fixtures/core/uncategorised/24/expected.json
index 91bb601500..cbc5697de4 100644
--- a/test/fixtures/core/uncategorised/24/expected.json
+++ b/test/fixtures/core/uncategorised/24/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 14,
"loc": {
@@ -122,7 +122,7 @@
"name": "true"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 14,
"loc": {
@@ -135,16 +135,18 @@
"column": 14
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/240/expected.json b/test/fixtures/core/uncategorised/240/expected.json
index 0221127370..3b790cdecf 100644
--- a/test/fixtures/core/uncategorised/240/expected.json
+++ b/test/fixtures/core/uncategorised/240/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 9,
"loc": {
@@ -87,9 +87,11 @@
"column": 9
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
},
"test": null,
@@ -110,6 +112,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/241/expected.json b/test/fixtures/core/uncategorised/241/expected.json
index 46c4e44c8f..e7c1db4ec7 100644
--- a/test/fixtures/core/uncategorised/241/expected.json
+++ b/test/fixtures/core/uncategorised/241/expected.json
@@ -88,7 +88,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 13,
"loc": {
@@ -101,9 +101,11 @@
"column": 13
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
}
],
@@ -127,6 +129,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/242/expected.json b/test/fixtures/core/uncategorised/242/expected.json
index 20b89977b6..eacbe24384 100644
--- a/test/fixtures/core/uncategorised/242/expected.json
+++ b/test/fixtures/core/uncategorised/242/expected.json
@@ -88,7 +88,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 13,
"loc": {
@@ -101,9 +101,11 @@
"column": 13
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
},
{
@@ -137,7 +139,7 @@
"name": "y"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 19,
"end": 20,
"loc": {
@@ -150,9 +152,11 @@
"column": 20
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
],
@@ -176,6 +180,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/243/expected.json b/test/fixtures/core/uncategorised/243/expected.json
index 66dff360f5..7f485aaf19 100644
--- a/test/fixtures/core/uncategorised/243/expected.json
+++ b/test/fixtures/core/uncategorised/243/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 9,
"loc": {
@@ -87,9 +87,11 @@
"column": 9
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
},
"test": {
@@ -124,7 +126,7 @@
},
"operator": "<",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 15,
"end": 17,
"loc": {
@@ -137,9 +139,11 @@
"column": 17
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
},
"update": null,
@@ -159,6 +163,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/244/expected.json b/test/fixtures/core/uncategorised/244/expected.json
index 1943c72a2e..0c6bf2a092 100644
--- a/test/fixtures/core/uncategorised/244/expected.json
+++ b/test/fixtures/core/uncategorised/244/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 9,
"loc": {
@@ -87,9 +87,11 @@
"column": 9
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
},
"test": {
@@ -124,7 +126,7 @@
},
"operator": "<",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 15,
"end": 17,
"loc": {
@@ -137,9 +139,11 @@
"column": 17
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
},
"update": {
@@ -191,6 +195,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/245/expected.json b/test/fixtures/core/uncategorised/245/expected.json
index ea41666efe..586cbf67f5 100644
--- a/test/fixtures/core/uncategorised/245/expected.json
+++ b/test/fixtures/core/uncategorised/245/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 9,
"loc": {
@@ -87,9 +87,11 @@
"column": 9
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
},
"test": {
@@ -124,7 +126,7 @@
},
"operator": "<",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 15,
"end": 17,
"loc": {
@@ -137,9 +139,11 @@
"column": 17
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
},
"update": {
@@ -240,6 +244,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/248/actual.js b/test/fixtures/core/uncategorised/248/actual.js
deleted file mode 100644
index b06fd22155..0000000000
--- a/test/fixtures/core/uncategorised/248/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-for (var x = 42 in list) process(x);
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/249/actual.js b/test/fixtures/core/uncategorised/249/actual.js
deleted file mode 100644
index d42823d7f5..0000000000
--- a/test/fixtures/core/uncategorised/249/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-for (var i = function() { return 10 in [] } in list) process(x);
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/249/expected.json b/test/fixtures/core/uncategorised/249/expected.json
deleted file mode 100644
index b0f5f0232d..0000000000
--- a/test/fixtures/core/uncategorised/249/expected.json
+++ /dev/null
@@ -1,278 +0,0 @@
-{
- "type": "File",
- "start": 0,
- "end": 64,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 64
- }
- },
- "program": {
- "type": "Program",
- "start": 0,
- "end": 64,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 64
- }
- },
- "sourceType": "script",
- "body": [
- {
- "type": "ForInStatement",
- "start": 0,
- "end": 64,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 64
- }
- },
- "left": {
- "type": "VariableDeclaration",
- "start": 5,
- "end": 43,
- "loc": {
- "start": {
- "line": 1,
- "column": 5
- },
- "end": {
- "line": 1,
- "column": 43
- }
- },
- "declarations": [
- {
- "type": "VariableDeclarator",
- "start": 9,
- "end": 43,
- "loc": {
- "start": {
- "line": 1,
- "column": 9
- },
- "end": {
- "line": 1,
- "column": 43
- }
- },
- "id": {
- "type": "Identifier",
- "start": 9,
- "end": 10,
- "loc": {
- "start": {
- "line": 1,
- "column": 9
- },
- "end": {
- "line": 1,
- "column": 10
- }
- },
- "name": "i"
- },
- "init": {
- "type": "FunctionExpression",
- "start": 13,
- "end": 43,
- "loc": {
- "start": {
- "line": 1,
- "column": 13
- },
- "end": {
- "line": 1,
- "column": 43
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 24,
- "end": 43,
- "loc": {
- "start": {
- "line": 1,
- "column": 24
- },
- "end": {
- "line": 1,
- "column": 43
- }
- },
- "body": [
- {
- "type": "ReturnStatement",
- "start": 26,
- "end": 41,
- "loc": {
- "start": {
- "line": 1,
- "column": 26
- },
- "end": {
- "line": 1,
- "column": 41
- }
- },
- "argument": {
- "type": "BinaryExpression",
- "start": 33,
- "end": 41,
- "loc": {
- "start": {
- "line": 1,
- "column": 33
- },
- "end": {
- "line": 1,
- "column": 41
- }
- },
- "left": {
- "type": "Literal",
- "start": 33,
- "end": 35,
- "loc": {
- "start": {
- "line": 1,
- "column": 33
- },
- "end": {
- "line": 1,
- "column": 35
- }
- },
- "value": 10,
- "rawValue": 10,
- "raw": "10"
- },
- "operator": "in",
- "right": {
- "type": "ArrayExpression",
- "start": 39,
- "end": 41,
- "loc": {
- "start": {
- "line": 1,
- "column": 39
- },
- "end": {
- "line": 1,
- "column": 41
- }
- },
- "elements": []
- }
- }
- }
- ]
- }
- }
- }
- ],
- "kind": "var"
- },
- "right": {
- "type": "Identifier",
- "start": 47,
- "end": 51,
- "loc": {
- "start": {
- "line": 1,
- "column": 47
- },
- "end": {
- "line": 1,
- "column": 51
- }
- },
- "name": "list"
- },
- "body": {
- "type": "ExpressionStatement",
- "start": 53,
- "end": 64,
- "loc": {
- "start": {
- "line": 1,
- "column": 53
- },
- "end": {
- "line": 1,
- "column": 64
- }
- },
- "expression": {
- "type": "CallExpression",
- "start": 53,
- "end": 63,
- "loc": {
- "start": {
- "line": 1,
- "column": 53
- },
- "end": {
- "line": 1,
- "column": 63
- }
- },
- "callee": {
- "type": "Identifier",
- "start": 53,
- "end": 60,
- "loc": {
- "start": {
- "line": 1,
- "column": 53
- },
- "end": {
- "line": 1,
- "column": 60
- }
- },
- "name": "process"
- },
- "arguments": [
- {
- "type": "Identifier",
- "start": 61,
- "end": 62,
- "loc": {
- "start": {
- "line": 1,
- "column": 61
- },
- "end": {
- "line": 1,
- "column": 62
- }
- },
- "name": "x"
- }
- ]
- }
- }
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/25/expected.json b/test/fixtures/core/uncategorised/25/expected.json
index bf78e60abe..bff1f7f9e9 100644
--- a/test/fixtures/core/uncategorised/25/expected.json
+++ b/test/fixtures/core/uncategorised/25/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 15,
"loc": {
@@ -122,7 +122,7 @@
"name": "false"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 13,
"end": 15,
"loc": {
@@ -135,16 +135,18 @@
"column": 15
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/250/expected.json b/test/fixtures/core/uncategorised/250/expected.json
index 9ea0854331..16edee2512 100644
--- a/test/fixtures/core/uncategorised/250/expected.json
+++ b/test/fixtures/core/uncategorised/250/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 7,
"end": 11,
"loc": {
@@ -56,9 +56,7 @@
"column": 11
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -91,9 +89,11 @@
},
"label": null
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/251/expected.json b/test/fixtures/core/uncategorised/251/expected.json
index 3cadc13b16..d58d0ffa9a 100644
--- a/test/fixtures/core/uncategorised/251/expected.json
+++ b/test/fixtures/core/uncategorised/251/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 7,
"end": 11,
"loc": {
@@ -56,9 +56,7 @@
"column": 11
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -91,9 +89,11 @@
},
"label": null
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/252/expected.json b/test/fixtures/core/uncategorised/252/expected.json
index 661b7b9d0a..3d3611769c 100644
--- a/test/fixtures/core/uncategorised/252/expected.json
+++ b/test/fixtures/core/uncategorised/252/expected.json
@@ -57,7 +57,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 13,
"end": 17,
"loc": {
@@ -70,9 +70,7 @@
"column": 17
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -120,7 +118,8 @@
"name": "done"
}
}
- ]
+ ],
+ "directives": []
}
},
"label": {
@@ -140,6 +139,7 @@
"name": "done"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/253/expected.json b/test/fixtures/core/uncategorised/253/expected.json
index 3c06ab2a96..e2eede95cf 100644
--- a/test/fixtures/core/uncategorised/253/expected.json
+++ b/test/fixtures/core/uncategorised/253/expected.json
@@ -57,7 +57,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 13,
"end": 17,
"loc": {
@@ -70,9 +70,7 @@
"column": 17
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -120,7 +118,8 @@
"name": "done"
}
}
- ]
+ ],
+ "directives": []
}
},
"label": {
@@ -140,6 +139,7 @@
"name": "done"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/254/expected.json b/test/fixtures/core/uncategorised/254/expected.json
index 1d9fe4c071..e27a473406 100644
--- a/test/fixtures/core/uncategorised/254/expected.json
+++ b/test/fixtures/core/uncategorised/254/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 7,
"end": 11,
"loc": {
@@ -56,9 +56,7 @@
"column": 11
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -91,9 +89,11 @@
},
"label": null
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/255/expected.json b/test/fixtures/core/uncategorised/255/expected.json
index de1ad554fa..930203bdfe 100644
--- a/test/fixtures/core/uncategorised/255/expected.json
+++ b/test/fixtures/core/uncategorised/255/expected.json
@@ -57,7 +57,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 13,
"end": 17,
"loc": {
@@ -70,9 +70,7 @@
"column": 17
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -120,7 +118,8 @@
"name": "done"
}
}
- ]
+ ],
+ "directives": []
}
},
"label": {
@@ -140,6 +139,7 @@
"name": "done"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/256/expected.json b/test/fixtures/core/uncategorised/256/expected.json
index 62a3160e6e..207d4cf4c5 100644
--- a/test/fixtures/core/uncategorised/256/expected.json
+++ b/test/fixtures/core/uncategorised/256/expected.json
@@ -57,7 +57,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 13,
"end": 17,
"loc": {
@@ -70,9 +70,7 @@
"column": 17
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -120,7 +118,8 @@
"name": "done"
}
}
- ]
+ ],
+ "directives": []
}
},
"label": {
@@ -140,6 +139,7 @@
"name": "done"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/259/expected.json b/test/fixtures/core/uncategorised/259/expected.json
index 3f86692dc7..3811851cf2 100644
--- a/test/fixtures/core/uncategorised/259/expected.json
+++ b/test/fixtures/core/uncategorised/259/expected.json
@@ -91,11 +91,15 @@
},
"argument": null
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/26/expected.json b/test/fixtures/core/uncategorised/26/expected.json
index 4a45b6dd41..ced9c6f1e5 100644
--- a/test/fixtures/core/uncategorised/26/expected.json
+++ b/test/fixtures/core/uncategorised/26/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 14,
"loc": {
@@ -122,7 +122,7 @@
"name": "null"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 14,
"loc": {
@@ -135,16 +135,18 @@
"column": 14
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/260/expected.json b/test/fixtures/core/uncategorised/260/expected.json
index f66370e4d6..cfc30f8e34 100644
--- a/test/fixtures/core/uncategorised/260/expected.json
+++ b/test/fixtures/core/uncategorised/260/expected.json
@@ -91,11 +91,15 @@
},
"argument": null
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/261/expected.json b/test/fixtures/core/uncategorised/261/expected.json
index 864565296e..7e253235fc 100644
--- a/test/fixtures/core/uncategorised/261/expected.json
+++ b/test/fixtures/core/uncategorised/261/expected.json
@@ -106,11 +106,15 @@
"name": "x"
}
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/262/expected.json b/test/fixtures/core/uncategorised/262/expected.json
index 9c0041eb71..d4f71c39ad 100644
--- a/test/fixtures/core/uncategorised/262/expected.json
+++ b/test/fixtures/core/uncategorised/262/expected.json
@@ -138,11 +138,15 @@
}
}
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/269/expected.json b/test/fixtures/core/uncategorised/269/expected.json
index 62e79f338e..6251d143ae 100644
--- a/test/fixtures/core/uncategorised/269/expected.json
+++ b/test/fixtures/core/uncategorised/269/expected.json
@@ -139,7 +139,7 @@
}
],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 23,
"end": 25,
"loc": {
@@ -152,13 +152,16 @@
"column": 25
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
]
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/27/expected.json b/test/fixtures/core/uncategorised/27/expected.json
index 8f6fb8980a..6cfa1d9324 100644
--- a/test/fixtures/core/uncategorised/27/expected.json
+++ b/test/fixtures/core/uncategorised/27/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 18,
"loc": {
@@ -106,7 +106,7 @@
"shorthand": false,
"computed": false,
"key": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 6,
"end": 14,
"loc": {
@@ -119,12 +119,14 @@
"column": 14
}
},
- "value": "answer",
- "rawValue": "answer",
- "raw": "\"answer\""
+ "extra": {
+ "rawValue": "answer",
+ "raw": "\"answer\""
+ },
+ "value": "answer"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 16,
"end": 18,
"loc": {
@@ -137,16 +139,18 @@
"column": 18
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/270/expected.json b/test/fixtures/core/uncategorised/270/expected.json
index b29ad0f66d..96908f65a6 100644
--- a/test/fixtures/core/uncategorised/270/expected.json
+++ b/test/fixtures/core/uncategorised/270/expected.json
@@ -139,7 +139,7 @@
}
],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 23,
"end": 25,
"loc": {
@@ -152,9 +152,11 @@
"column": 25
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
},
{
@@ -193,6 +195,7 @@
}
]
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/272/expected.json b/test/fixtures/core/uncategorised/272/expected.json
index cddf16fc26..5157602658 100644
--- a/test/fixtures/core/uncategorised/272/expected.json
+++ b/test/fixtures/core/uncategorised/272/expected.json
@@ -57,7 +57,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 14,
"end": 18,
"loc": {
@@ -70,9 +70,7 @@
"column": 18
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BreakStatement",
@@ -123,6 +121,7 @@
"name": "start"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/275/expected.json b/test/fixtures/core/uncategorised/275/expected.json
index fe437eefa7..1586888a8b 100644
--- a/test/fixtures/core/uncategorised/275/expected.json
+++ b/test/fixtures/core/uncategorised/275/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 8,
"end": 24,
"loc": {
@@ -91,7 +91,7 @@
"name": "message"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 17,
"end": 24,
"loc": {
@@ -104,15 +104,17 @@
"column": 24
}
},
- "value": "Error",
- "rawValue": "Error",
- "raw": "\"Error\""
- },
- "kind": "init"
+ "extra": {
+ "rawValue": "Error",
+ "raw": "\"Error\""
+ },
+ "value": "Error"
+ }
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/28/expected.json b/test/fixtures/core/uncategorised/28/expected.json
index 4a5cc05f3d..0f013c127d 100644
--- a/test/fixtures/core/uncategorised/28/expected.json
+++ b/test/fixtures/core/uncategorised/28/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 10,
"loc": {
@@ -122,7 +122,7 @@
"name": "x"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 9,
"end": 10,
"loc": {
@@ -135,14 +135,15 @@
"column": 10
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 12,
"end": 16,
"loc": {
@@ -175,7 +176,7 @@
"name": "x"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 15,
"end": 16,
"loc": {
@@ -188,16 +189,18 @@
"column": 16
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
+ }
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/288/expected.json b/test/fixtures/core/uncategorised/288/expected.json
index 246b6b5a20..a9c517251e 100644
--- a/test/fixtures/core/uncategorised/288/expected.json
+++ b/test/fixtures/core/uncategorised/288/expected.json
@@ -122,11 +122,15 @@
"column": 24
}
},
- "body": []
+ "body": [],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/289/expected.json b/test/fixtures/core/uncategorised/289/expected.json
index c1db4cf35a..5924cefb02 100644
--- a/test/fixtures/core/uncategorised/289/expected.json
+++ b/test/fixtures/core/uncategorised/289/expected.json
@@ -123,9 +123,10 @@
"column": 51
}
},
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 37,
"end": 49,
"loc": {
@@ -138,8 +139,8 @@
"column": 49
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 37,
"end": 49,
"loc": {
@@ -153,16 +154,20 @@
}
},
"value": "use strict",
- "rawValue": "use strict",
- "raw": "\"use strict\""
+ "extra": {
+ "raw": "\"use strict\"",
+ "rawValue": "use strict"
+ }
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/29/expected.json b/test/fixtures/core/uncategorised/29/expected.json
index 6cd7aee600..1462403c0d 100644
--- a/test/fixtures/core/uncategorised/29/expected.json
+++ b/test/fixtures/core/uncategorised/29/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 36,
"loc": {
@@ -122,78 +122,65 @@
"name": "width"
},
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 15,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
"end": 36,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 18
},
"end": {
"line": 1,
"column": 36
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 18,
- "end": 36,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 20,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
},
- "end": {
- "line": 1,
- "column": 36
- }
- },
- "body": [
- {
- "type": "ReturnStatement",
- "start": 20,
+ "argument": {
+ "type": "Identifier",
+ "start": 27,
"end": 34,
"loc": {
"start": {
"line": 1,
- "column": 20
+ "column": 27
},
"end": {
"line": 1,
"column": 34
}
},
- "argument": {
- "type": "Identifier",
- "start": 27,
- "end": 34,
- "loc": {
- "start": {
- "line": 1,
- "column": 27
- },
- "end": {
- "line": 1,
- "column": 34
- }
- },
- "name": "m_width"
- }
+ "name": "m_width"
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/299/expected.json b/test/fixtures/core/uncategorised/299/expected.json
index 4841a07e51..fac0f4b32c 100644
--- a/test/fixtures/core/uncategorised/299/expected.json
+++ b/test/fixtures/core/uncategorised/299/expected.json
@@ -74,11 +74,15 @@
"column": 13
}
},
- "body": []
+ "body": [],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/3/expected.json b/test/fixtures/core/uncategorised/3/expected.json
index c05561829f..1c7de0b706 100644
--- a/test/fixtures/core/uncategorised/3/expected.json
+++ b/test/fixtures/core/uncategorised/3/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 7,
"loc": {
@@ -56,11 +56,14 @@
"column": 6
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/30/expected.json b/test/fixtures/core/uncategorised/30/expected.json
index bfcf233e05..7694f2fd33 100644
--- a/test/fixtures/core/uncategorised/30/expected.json
+++ b/test/fixtures/core/uncategorised/30/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 20,
"loc": {
@@ -122,46 +122,33 @@
"name": "undef"
},
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 15,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
"end": 20,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 18
},
"end": {
"line": 1,
"column": 20
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 18,
- "end": 20,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 20
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/302/expected.json b/test/fixtures/core/uncategorised/302/expected.json
index 668b5a1ccc..b80d317427 100644
--- a/test/fixtures/core/uncategorised/302/expected.json
+++ b/test/fixtures/core/uncategorised/302/expected.json
@@ -91,17 +91,32 @@
"line": 1,
"column": 19
}
- },
- "range": [
- 6,
- 19
- ]
+ }
}
]
}
],
"kind": "var"
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " comment ",
+ "start": 6,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/303/expected.json b/test/fixtures/core/uncategorised/303/expected.json
index 54b06ec57a..607612e873 100644
--- a/test/fixtures/core/uncategorised/303/expected.json
+++ b/test/fixtures/core/uncategorised/303/expected.json
@@ -89,7 +89,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 12,
"loc": {
@@ -102,9 +102,11 @@
"column": 12
}
},
- "value": 14,
- "rawValue": 14,
- "raw": "14"
+ "extra": {
+ "rawValue": 14,
+ "raw": "14"
+ },
+ "value": 14
}
},
{
@@ -138,7 +140,7 @@
"name": "y"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 18,
"end": 19,
"loc": {
@@ -151,9 +153,11 @@
"column": 19
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
}
}
],
@@ -190,8 +194,10 @@
"name": "z"
}
}
- ]
+ ],
+ "directives": []
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/304/expected.json b/test/fixtures/core/uncategorised/304/expected.json
index 417879a077..1c02f6ef66 100644
--- a/test/fixtures/core/uncategorised/304/expected.json
+++ b/test/fixtures/core/uncategorised/304/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 7,
"end": 11,
"loc": {
@@ -56,9 +56,7 @@
"column": 11
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -122,9 +120,11 @@
"name": "there"
}
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/305/expected.json b/test/fixtures/core/uncategorised/305/expected.json
index 85d1c9cc9b..675fe056a3 100644
--- a/test/fixtures/core/uncategorised/305/expected.json
+++ b/test/fixtures/core/uncategorised/305/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 7,
"end": 11,
"loc": {
@@ -56,9 +56,7 @@
"column": 11
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -106,11 +104,7 @@
"line": 1,
"column": 34
}
- },
- "range": [
- 24,
- 34
- ]
+ }
}
]
},
@@ -160,17 +154,33 @@
"line": 1,
"column": 34
}
- },
- "range": [
- 24,
- 34
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 24,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/306/expected.json b/test/fixtures/core/uncategorised/306/expected.json
index 420314dcf8..dfef6b5c50 100644
--- a/test/fixtures/core/uncategorised/306/expected.json
+++ b/test/fixtures/core/uncategorised/306/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 7,
"end": 11,
"loc": {
@@ -56,9 +56,7 @@
"column": 11
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -106,11 +104,7 @@
"line": 2,
"column": 10
}
- },
- "range": [
- 24,
- 47
- ]
+ }
}
]
},
@@ -160,17 +154,33 @@
"line": 2,
"column": 10
}
- },
- "range": [
- 24,
- 47
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 24,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/307/expected.json b/test/fixtures/core/uncategorised/307/expected.json
index 6f55ed4658..2b8d9fef9f 100644
--- a/test/fixtures/core/uncategorised/307/expected.json
+++ b/test/fixtures/core/uncategorised/307/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 7,
"end": 11,
"loc": {
@@ -56,9 +56,7 @@
"column": 11
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -122,9 +120,11 @@
"name": "there"
}
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/308/expected.json b/test/fixtures/core/uncategorised/308/expected.json
index 16b5f8de23..21c911cbbc 100644
--- a/test/fixtures/core/uncategorised/308/expected.json
+++ b/test/fixtures/core/uncategorised/308/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 7,
"end": 11,
"loc": {
@@ -56,9 +56,7 @@
"column": 11
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -106,11 +104,7 @@
"line": 1,
"column": 31
}
- },
- "range": [
- 21,
- 31
- ]
+ }
}
]
},
@@ -160,17 +154,33 @@
"line": 1,
"column": 31
}
- },
- "range": [
- 21,
- 31
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 21,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/309/expected.json b/test/fixtures/core/uncategorised/309/expected.json
index f41d20534e..55ac6a29a8 100644
--- a/test/fixtures/core/uncategorised/309/expected.json
+++ b/test/fixtures/core/uncategorised/309/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 7,
"end": 11,
"loc": {
@@ -56,9 +56,7 @@
"column": 11
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"body": {
"type": "BlockStatement",
@@ -106,11 +104,7 @@
"line": 2,
"column": 10
}
- },
- "range": [
- 21,
- 44
- ]
+ }
}
]
},
@@ -160,17 +154,33 @@
"line": 2,
"column": 10
}
- },
- "range": [
- 21,
- 44
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 21,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/31/expected.json b/test/fixtures/core/uncategorised/31/expected.json
index a81f0be417..966b9f90ca 100644
--- a/test/fixtures/core/uncategorised/31/expected.json
+++ b/test/fixtures/core/uncategorised/31/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 17,
"loc": {
@@ -122,46 +122,33 @@
"name": "if"
},
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 12,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 15,
"end": 17,
"loc": {
"start": {
"line": 1,
- "column": 12
+ "column": 15
},
"end": {
"line": 1,
"column": 17
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 15,
- "end": 17,
- "loc": {
- "start": {
- "line": 1,
- "column": 15
- },
- "end": {
- "line": 1,
- "column": 17
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/310/expected.json b/test/fixtures/core/uncategorised/310/expected.json
index 9098864a2b..7d4c8d5bb6 100644
--- a/test/fixtures/core/uncategorised/310/expected.json
+++ b/test/fixtures/core/uncategorised/310/expected.json
@@ -122,11 +122,15 @@
"name": "x"
}
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/311/expected.json b/test/fixtures/core/uncategorised/311/expected.json
index f9a8a99635..f0cf8a4b53 100644
--- a/test/fixtures/core/uncategorised/311/expected.json
+++ b/test/fixtures/core/uncategorised/311/expected.json
@@ -106,11 +106,7 @@
"line": 1,
"column": 30
}
- },
- "range": [
- 20,
- 30
- ]
+ }
}
]
},
@@ -160,19 +156,37 @@
"line": 1,
"column": 30
}
- },
- "range": [
- 20,
- 30
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 20,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/312/expected.json b/test/fixtures/core/uncategorised/312/expected.json
index 217daeda72..975bfdf605 100644
--- a/test/fixtures/core/uncategorised/312/expected.json
+++ b/test/fixtures/core/uncategorised/312/expected.json
@@ -106,11 +106,7 @@
"line": 2,
"column": 10
}
- },
- "range": [
- 19,
- 42
- ]
+ }
}
]
},
@@ -160,19 +156,37 @@
"line": 2,
"column": 10
}
- },
- "range": [
- 19,
- 42
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 19,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/314/expected.json b/test/fixtures/core/uncategorised/314/expected.json
index d0361e267d..1340d70360 100644
--- a/test/fixtures/core/uncategorised/314/expected.json
+++ b/test/fixtures/core/uncategorised/314/expected.json
@@ -90,11 +90,7 @@
"line": 1,
"column": 23
}
- },
- "range": [
- 13,
- 23
- ]
+ }
}
]
},
@@ -144,16 +140,32 @@
"line": 1,
"column": 23
}
- },
- "range": [
- 13,
- 23
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 13,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/315/expected.json b/test/fixtures/core/uncategorised/315/expected.json
index 51f1550026..fcf481f414 100644
--- a/test/fixtures/core/uncategorised/315/expected.json
+++ b/test/fixtures/core/uncategorised/315/expected.json
@@ -90,11 +90,7 @@
"line": 2,
"column": 10
}
- },
- "range": [
- 13,
- 36
- ]
+ }
}
]
},
@@ -144,16 +140,32 @@
"line": 2,
"column": 10
}
- },
- "range": [
- 13,
- 36
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 13,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/317/expected.json b/test/fixtures/core/uncategorised/317/expected.json
index 70a7b043b5..96b5884573 100644
--- a/test/fixtures/core/uncategorised/317/expected.json
+++ b/test/fixtures/core/uncategorised/317/expected.json
@@ -57,7 +57,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 9,
"end": 13,
"loc": {
@@ -70,9 +70,7 @@
"column": 13
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"consequent": {
"type": "BreakStatement",
@@ -124,6 +122,7 @@
"name": "foo"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/318/expected.json b/test/fixtures/core/uncategorised/318/expected.json
index 1af7d36137..1fda36e9a7 100644
--- a/test/fixtures/core/uncategorised/318/expected.json
+++ b/test/fixtures/core/uncategorised/318/expected.json
@@ -88,9 +88,10 @@
"column": 1
}
},
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 16,
"end": 29,
"loc": {
@@ -103,8 +104,8 @@
"column": 14
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 16,
"end": 28,
"loc": {
@@ -118,12 +119,14 @@
}
},
"value": "use strict",
- "rawValue": "use strict",
- "raw": "'use strict'"
+ "extra": {
+ "raw": "'use strict'",
+ "rawValue": "use strict"
+ }
}
},
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 31,
"end": 35,
"loc": {
@@ -136,8 +139,8 @@
"column": 5
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 31,
"end": 34,
"loc": {
@@ -151,17 +154,22 @@
}
},
"value": "\u0000",
- "rawValue": "\u0000",
- "raw": "'\u0000'"
+ "extra": {
+ "raw": "'\u0000'",
+ "rawValue": "\u0000"
+ }
}
}
]
}
},
"arguments": [],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/319/expected.json b/test/fixtures/core/uncategorised/319/expected.json
index 7bfda37783..61133f8ac6 100644
--- a/test/fixtures/core/uncategorised/319/expected.json
+++ b/test/fixtures/core/uncategorised/319/expected.json
@@ -71,7 +71,7 @@
}
},
"object": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -84,9 +84,11 @@
"column": 4
}
},
- "value": 123,
- "rawValue": 123,
- "raw": "123."
+ "extra": {
+ "rawValue": 123,
+ "raw": "123."
+ },
+ "value": 123
},
"property": {
"type": "Identifier",
@@ -108,7 +110,7 @@
},
"arguments": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 14,
"end": 16,
"loc": {
@@ -121,13 +123,16 @@
"column": 16
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/32/expected.json b/test/fixtures/core/uncategorised/32/expected.json
index 755ded80c2..0ab2082d42 100644
--- a/test/fixtures/core/uncategorised/32/expected.json
+++ b/test/fixtures/core/uncategorised/32/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 19,
"loc": {
@@ -122,46 +122,33 @@
"name": "true"
},
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 14,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
"end": 19,
"loc": {
"start": {
"line": 1,
- "column": 14
+ "column": 17
},
"end": {
"line": 1,
"column": 19
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 17,
- "end": 19,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 19
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/320/expected.json b/test/fixtures/core/uncategorised/320/expected.json
index d18528b0b3..da052c6d87 100644
--- a/test/fixtures/core/uncategorised/320/expected.json
+++ b/test/fixtures/core/uncategorised/320/expected.json
@@ -57,7 +57,7 @@
}
},
"left": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -70,13 +70,15 @@
"column": 4
}
},
- "value": 123,
- "rawValue": 123,
- "raw": "123."
+ "extra": {
+ "rawValue": 123,
+ "raw": "123."
+ },
+ "value": 123
},
"operator": "+",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 6,
"loc": {
@@ -89,12 +91,15 @@
"column": 6
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/322/expected.json b/test/fixtures/core/uncategorised/322/expected.json
index 4bb48ca6a4..16ba69aff9 100644
--- a/test/fixtures/core/uncategorised/322/expected.json
+++ b/test/fixtures/core/uncategorised/322/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 10,
"loc": {
@@ -42,8 +43,8 @@
"column": 10
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 10,
"loc": {
@@ -56,9 +57,11 @@
"column": 10
}
},
- "value": "a&b",
- "rawValue": "a&b",
- "raw": "'a\\u0026b'"
+ "value": "a\\u0026b",
+ "extra": {
+ "raw": "'a\\u0026b'",
+ "rawValue": "a\\u0026b"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/323/expected.json b/test/fixtures/core/uncategorised/323/expected.json
index ed6fd4e376..583c34687b 100644
--- a/test/fixtures/core/uncategorised/323/expected.json
+++ b/test/fixtures/core/uncategorised/323/expected.json
@@ -57,7 +57,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 7,
"loc": {
@@ -70,9 +70,11 @@
"column": 7
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
},
"label": {
@@ -121,7 +123,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 14,
"end": 16,
"loc": {
@@ -134,9 +136,11 @@
"column": 16
}
},
- "value": 20,
- "rawValue": 20,
- "raw": "20"
+ "extra": {
+ "rawValue": 20,
+ "raw": "20"
+ },
+ "value": 20
}
},
"label": {
@@ -156,6 +160,7 @@
"name": "foo"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/324/expected.json b/test/fixtures/core/uncategorised/324/expected.json
index e28711fe0b..41b1dcbac8 100644
--- a/test/fixtures/core/uncategorised/324/expected.json
+++ b/test/fixtures/core/uncategorised/324/expected.json
@@ -43,7 +43,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 3,
"end": 4,
"loc": {
@@ -56,9 +56,11 @@
"column": 4
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
"consequent": {
"type": "ExpressionStatement",
@@ -75,7 +77,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 5,
"end": 12,
"loc": {
@@ -88,15 +90,16 @@
"column": 12
}
},
- "raw": "/ foo/",
- "regex": {
- "pattern": " foo",
- "flags": ""
- }
+ "extra": {
+ "raw": "/ foo/"
+ },
+ "pattern": " foo",
+ "flags": ""
}
},
"alternate": null
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/33/expected.json b/test/fixtures/core/uncategorised/33/expected.json
index c8111bb6cc..ccc78d04a7 100644
--- a/test/fixtures/core/uncategorised/33/expected.json
+++ b/test/fixtures/core/uncategorised/33/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 20,
"loc": {
@@ -122,46 +122,33 @@
"name": "false"
},
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 15,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
"end": 20,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 18
},
"end": {
"line": 1,
"column": 20
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 18,
- "end": 20,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 20
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/34/expected.json b/test/fixtures/core/uncategorised/34/expected.json
index dd04ddeac2..c8ef1380a8 100644
--- a/test/fixtures/core/uncategorised/34/expected.json
+++ b/test/fixtures/core/uncategorised/34/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 19,
"loc": {
@@ -122,46 +122,33 @@
"name": "null"
},
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 14,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
"end": 19,
"loc": {
"start": {
"line": 1,
- "column": 14
+ "column": 17
},
"end": {
"line": 1,
"column": 19
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 17,
- "end": 19,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 19
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/341/expected.json b/test/fixtures/core/uncategorised/341/expected.json
index 88d5fefb2d..487553a051 100644
--- a/test/fixtures/core/uncategorised/341/expected.json
+++ b/test/fixtures/core/uncategorised/341/expected.json
@@ -42,7 +42,8 @@
"column": 2
}
},
- "body": []
+ "body": [],
+ "directives": []
},
{
"type": "ExpressionStatement",
@@ -59,7 +60,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 2,
"end": 5,
"loc": {
@@ -72,13 +73,14 @@
"column": 5
}
},
- "raw": "/=/",
- "regex": {
- "pattern": "=",
- "flags": ""
- }
+ "extra": {
+ "raw": "/=/"
+ },
+ "pattern": "=",
+ "flags": ""
}
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/342/expected.json b/test/fixtures/core/uncategorised/342/expected.json
index 4e26603533..418f936ff6 100644
--- a/test/fixtures/core/uncategorised/342/expected.json
+++ b/test/fixtures/core/uncategorised/342/expected.json
@@ -87,11 +87,7 @@
"line": 1,
"column": 11
}
- },
- "range": [
- 4,
- 11
- ]
+ }
}
]
},
@@ -126,16 +122,31 @@
"line": 1,
"column": 11
}
- },
- "range": [
- 4,
- 11
- ]
+ }
}
]
}
}
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": "bar",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/343/expected.json b/test/fixtures/core/uncategorised/343/expected.json
index 4d99a8faca..d2ed65cb86 100644
--- a/test/fixtures/core/uncategorised/343/expected.json
+++ b/test/fixtures/core/uncategorised/343/expected.json
@@ -122,7 +122,7 @@
},
"operator": ">",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -135,9 +135,11 @@
"column": 10
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
},
@@ -156,14 +158,29 @@
"line": 2,
"column": 12
}
- },
- "range": [
- 13,
- 24
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " nothing",
+ "start": 13,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/344/expected.json b/test/fixtures/core/uncategorised/344/expected.json
index d8e160600f..827aebf2db 100644
--- a/test/fixtures/core/uncategorised/344/expected.json
+++ b/test/fixtures/core/uncategorised/344/expected.json
@@ -28,39 +28,6 @@
},
"sourceType": "script",
"body": [
- {
- "type": "ExpressionStatement",
- "start": 0,
- "end": 13,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 13
- }
- },
- "expression": {
- "type": "Literal",
- "start": 0,
- "end": 12,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 12
- }
- },
- "value": "use strict",
- "rawValue": "use strict",
- "raw": "'use strict'"
- }
- },
{
"type": "ExpressionStatement",
"start": 14,
@@ -140,6 +107,43 @@
"arguments": []
}
}
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "value": "use strict",
+ "extra": {
+ "raw": "'use strict'",
+ "rawValue": "use strict"
+ }
+ }
+ }
]
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/35/expected.json b/test/fixtures/core/uncategorised/35/expected.json
index d8f2ba1cf2..6a4504c896 100644
--- a/test/fixtures/core/uncategorised/35/expected.json
+++ b/test/fixtures/core/uncategorised/35/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 22,
"loc": {
@@ -106,7 +106,7 @@
"shorthand": false,
"computed": false,
"key": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 10,
"end": 17,
"loc": {
@@ -119,51 +119,40 @@
"column": 17
}
},
- "value": "undef",
- "rawValue": "undef",
- "raw": "\"undef\""
+ "extra": {
+ "rawValue": "undef",
+ "raw": "\"undef\""
+ },
+ "value": "undef"
},
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 17,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
"end": 22,
"loc": {
"start": {
"line": 1,
- "column": 17
+ "column": 20
},
"end": {
"line": 1,
"column": 22
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 20,
- "end": 22,
- "loc": {
- "start": {
- "line": 1,
- "column": 20
- },
- "end": {
- "line": 1,
- "column": 22
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/36/expected.json b/test/fixtures/core/uncategorised/36/expected.json
index a9d4864fed..7ff1fbb46b 100644
--- a/test/fixtures/core/uncategorised/36/expected.json
+++ b/test/fixtures/core/uncategorised/36/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 17,
"loc": {
@@ -106,7 +106,7 @@
"shorthand": false,
"computed": false,
"key": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 12,
"loc": {
@@ -119,51 +119,40 @@
"column": 12
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
},
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 12,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 15,
"end": 17,
"loc": {
"start": {
"line": 1,
- "column": 12
+ "column": 15
},
"end": {
"line": 1,
"column": 17
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 15,
- "end": 17,
- "loc": {
- "start": {
- "line": 1,
- "column": 15
- },
- "end": {
- "line": 1,
- "column": 17
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/37/expected.json b/test/fixtures/core/uncategorised/37/expected.json
index 04f9698103..ad75991dc1 100644
--- a/test/fixtures/core/uncategorised/37/expected.json
+++ b/test/fixtures/core/uncategorised/37/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 34,
"loc": {
@@ -122,58 +122,58 @@
"name": "width"
},
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 15,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "w"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
"end": 34,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 19
},
"end": {
"line": 1,
"column": 34
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 16,
- "end": 17,
+ "type": "ExpressionStatement",
+ "start": 21,
+ "end": 32,
"loc": {
"start": {
"line": 1,
- "column": 16
+ "column": 21
},
"end": {
"line": 1,
- "column": 17
+ "column": 32
}
},
- "name": "w"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 19,
- "end": 34,
- "loc": {
- "start": {
- "line": 1,
- "column": 19
- },
- "end": {
- "line": 1,
- "column": 34
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
"start": 21,
"end": 32,
"loc": {
@@ -186,63 +186,50 @@
"column": 32
}
},
- "expression": {
- "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
"start": 21,
- "end": 32,
+ "end": 28,
"loc": {
"start": {
"line": 1,
"column": 21
},
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "name": "m_width"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
"end": {
"line": 1,
"column": 32
}
},
- "operator": "=",
- "left": {
- "type": "Identifier",
- "start": 21,
- "end": 28,
- "loc": {
- "start": {
- "line": 1,
- "column": 21
- },
- "end": {
- "line": 1,
- "column": 28
- }
- },
- "name": "m_width"
- },
- "right": {
- "type": "Identifier",
- "start": 31,
- "end": 32,
- "loc": {
- "start": {
- "line": 1,
- "column": 31
- },
- "end": {
- "line": 1,
- "column": 32
- }
- },
- "name": "w"
- }
+ "name": "w"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/38/expected.json b/test/fixtures/core/uncategorised/38/expected.json
index 360b95f14c..e290b184de 100644
--- a/test/fixtures/core/uncategorised/38/expected.json
+++ b/test/fixtures/core/uncategorised/38/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 28,
"loc": {
@@ -122,58 +122,58 @@
"name": "if"
},
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 12,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "w"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
"end": 28,
"loc": {
"start": {
"line": 1,
- "column": 12
+ "column": 16
},
"end": {
"line": 1,
"column": 28
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 13,
- "end": 14,
+ "type": "ExpressionStatement",
+ "start": 18,
+ "end": 26,
"loc": {
"start": {
"line": 1,
- "column": 13
+ "column": 18
},
"end": {
"line": 1,
- "column": 14
+ "column": 26
}
},
- "name": "w"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 16,
- "end": 28,
- "loc": {
- "start": {
- "line": 1,
- "column": 16
- },
- "end": {
- "line": 1,
- "column": 28
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
"start": 18,
"end": 26,
"loc": {
@@ -186,63 +186,50 @@
"column": 26
}
},
- "expression": {
- "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
"start": 18,
- "end": 26,
+ "end": 22,
"loc": {
"start": {
"line": 1,
"column": 18
},
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "m_if"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
"end": {
"line": 1,
"column": 26
}
},
- "operator": "=",
- "left": {
- "type": "Identifier",
- "start": 18,
- "end": 22,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 22
- }
- },
- "name": "m_if"
- },
- "right": {
- "type": "Identifier",
- "start": 25,
- "end": 26,
- "loc": {
- "start": {
- "line": 1,
- "column": 25
- },
- "end": {
- "line": 1,
- "column": 26
- }
- },
- "name": "w"
- }
+ "name": "w"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/39/expected.json b/test/fixtures/core/uncategorised/39/expected.json
index 3a2ec9b899..60ca06a14b 100644
--- a/test/fixtures/core/uncategorised/39/expected.json
+++ b/test/fixtures/core/uncategorised/39/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 32,
"loc": {
@@ -122,58 +122,58 @@
"name": "true"
},
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 14,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "w"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
"end": 32,
"loc": {
"start": {
"line": 1,
- "column": 14
+ "column": 18
},
"end": {
"line": 1,
"column": 32
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 15,
- "end": 16,
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 30,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 20
},
"end": {
"line": 1,
- "column": 16
+ "column": 30
}
},
- "name": "w"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 18,
- "end": 32,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 32
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
"start": 20,
"end": 30,
"loc": {
@@ -186,63 +186,50 @@
"column": 30
}
},
- "expression": {
- "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
"start": 20,
- "end": 30,
+ "end": 26,
"loc": {
"start": {
"line": 1,
"column": 20
},
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "name": "m_true"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 29,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
"end": {
"line": 1,
"column": 30
}
},
- "operator": "=",
- "left": {
- "type": "Identifier",
- "start": 20,
- "end": 26,
- "loc": {
- "start": {
- "line": 1,
- "column": 20
- },
- "end": {
- "line": 1,
- "column": 26
- }
- },
- "name": "m_true"
- },
- "right": {
- "type": "Identifier",
- "start": 29,
- "end": 30,
- "loc": {
- "start": {
- "line": 1,
- "column": 29
- },
- "end": {
- "line": 1,
- "column": 30
- }
- },
- "name": "w"
- }
+ "name": "w"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/4/expected.json b/test/fixtures/core/uncategorised/4/expected.json
index 9c29ccb629..850ccec0d7 100644
--- a/test/fixtures/core/uncategorised/4/expected.json
+++ b/test/fixtures/core/uncategorised/4/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 0,
"end": 8,
"loc": {
@@ -56,13 +56,14 @@
"column": 8
}
},
- "raw": "/foobar/",
- "regex": {
- "pattern": "foobar",
- "flags": ""
- }
+ "extra": {
+ "raw": "/foobar/"
+ },
+ "pattern": "foobar",
+ "flags": ""
}
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/40/expected.json b/test/fixtures/core/uncategorised/40/expected.json
index 198c6f8e8d..2e92b355f6 100644
--- a/test/fixtures/core/uncategorised/40/expected.json
+++ b/test/fixtures/core/uncategorised/40/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 34,
"loc": {
@@ -122,58 +122,58 @@
"name": "false"
},
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 15,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "w"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
"end": 34,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 19
},
"end": {
"line": 1,
"column": 34
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 16,
- "end": 17,
+ "type": "ExpressionStatement",
+ "start": 21,
+ "end": 32,
"loc": {
"start": {
"line": 1,
- "column": 16
+ "column": 21
},
"end": {
"line": 1,
- "column": 17
+ "column": 32
}
},
- "name": "w"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 19,
- "end": 34,
- "loc": {
- "start": {
- "line": 1,
- "column": 19
- },
- "end": {
- "line": 1,
- "column": 34
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
"start": 21,
"end": 32,
"loc": {
@@ -186,63 +186,50 @@
"column": 32
}
},
- "expression": {
- "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
"start": 21,
- "end": 32,
+ "end": 28,
"loc": {
"start": {
"line": 1,
"column": 21
},
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "name": "m_false"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
"end": {
"line": 1,
"column": 32
}
},
- "operator": "=",
- "left": {
- "type": "Identifier",
- "start": 21,
- "end": 28,
- "loc": {
- "start": {
- "line": 1,
- "column": 21
- },
- "end": {
- "line": 1,
- "column": 28
- }
- },
- "name": "m_false"
- },
- "right": {
- "type": "Identifier",
- "start": 31,
- "end": 32,
- "loc": {
- "start": {
- "line": 1,
- "column": 31
- },
- "end": {
- "line": 1,
- "column": 32
- }
- },
- "name": "w"
- }
+ "name": "w"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/41/expected.json b/test/fixtures/core/uncategorised/41/expected.json
index 8624ffd5ef..af9300d188 100644
--- a/test/fixtures/core/uncategorised/41/expected.json
+++ b/test/fixtures/core/uncategorised/41/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 32,
"loc": {
@@ -122,58 +122,58 @@
"name": "null"
},
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 14,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "w"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
"end": 32,
"loc": {
"start": {
"line": 1,
- "column": 14
+ "column": 18
},
"end": {
"line": 1,
"column": 32
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 15,
- "end": 16,
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 30,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 20
},
"end": {
"line": 1,
- "column": 16
+ "column": 30
}
},
- "name": "w"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 18,
- "end": 32,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 32
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
"start": 20,
"end": 30,
"loc": {
@@ -186,63 +186,50 @@
"column": 30
}
},
- "expression": {
- "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
"start": 20,
- "end": 30,
+ "end": 26,
"loc": {
"start": {
"line": 1,
"column": 20
},
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "name": "m_null"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 29,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
"end": {
"line": 1,
"column": 30
}
},
- "operator": "=",
- "left": {
- "type": "Identifier",
- "start": 20,
- "end": 26,
- "loc": {
- "start": {
- "line": 1,
- "column": 20
- },
- "end": {
- "line": 1,
- "column": 26
- }
- },
- "name": "m_null"
- },
- "right": {
- "type": "Identifier",
- "start": 29,
- "end": 30,
- "loc": {
- "start": {
- "line": 1,
- "column": 29
- },
- "end": {
- "line": 1,
- "column": 30
- }
- },
- "name": "w"
- }
+ "name": "w"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/42/expected.json b/test/fixtures/core/uncategorised/42/expected.json
index fbaae8d9f1..7bc3ec6059 100644
--- a/test/fixtures/core/uncategorised/42/expected.json
+++ b/test/fixtures/core/uncategorised/42/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 34,
"loc": {
@@ -106,7 +106,7 @@
"shorthand": false,
"computed": false,
"key": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 10,
"end": 16,
"loc": {
@@ -119,63 +119,65 @@
"column": 16
}
},
- "value": "null",
- "rawValue": "null",
- "raw": "\"null\""
+ "extra": {
+ "rawValue": "null",
+ "raw": "\"null\""
+ },
+ "value": "null"
},
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 16,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "w"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
"end": 34,
"loc": {
"start": {
"line": 1,
- "column": 16
+ "column": 20
},
"end": {
"line": 1,
"column": 34
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 17,
- "end": 18,
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 32,
"loc": {
"start": {
"line": 1,
- "column": 17
+ "column": 22
},
"end": {
"line": 1,
- "column": 18
+ "column": 32
}
},
- "name": "w"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 20,
- "end": 34,
- "loc": {
- "start": {
- "line": 1,
- "column": 20
- },
- "end": {
- "line": 1,
- "column": 34
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
"start": 22,
"end": 32,
"loc": {
@@ -188,63 +190,50 @@
"column": 32
}
},
- "expression": {
- "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
"start": 22,
- "end": 32,
+ "end": 28,
"loc": {
"start": {
"line": 1,
"column": 22
},
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "name": "m_null"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
"end": {
"line": 1,
"column": 32
}
},
- "operator": "=",
- "left": {
- "type": "Identifier",
- "start": 22,
- "end": 28,
- "loc": {
- "start": {
- "line": 1,
- "column": 22
- },
- "end": {
- "line": 1,
- "column": 28
- }
- },
- "name": "m_null"
- },
- "right": {
- "type": "Identifier",
- "start": 31,
- "end": 32,
- "loc": {
- "start": {
- "line": 1,
- "column": 31
- },
- "end": {
- "line": 1,
- "column": 32
- }
- },
- "name": "w"
- }
+ "name": "w"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/43/expected.json b/test/fixtures/core/uncategorised/43/expected.json
index ae9c51390d..7a72b8763e 100644
--- a/test/fixtures/core/uncategorised/43/expected.json
+++ b/test/fixtures/core/uncategorised/43/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 30,
"loc": {
@@ -106,7 +106,7 @@
"shorthand": false,
"computed": false,
"key": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 12,
"loc": {
@@ -119,63 +119,65 @@
"column": 12
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
},
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 12,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "w"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
"end": 30,
"loc": {
"start": {
"line": 1,
- "column": 12
+ "column": 16
},
"end": {
"line": 1,
"column": 30
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 13,
- "end": 14,
+ "type": "ExpressionStatement",
+ "start": 18,
+ "end": 28,
"loc": {
"start": {
"line": 1,
- "column": 13
+ "column": 18
},
"end": {
"line": 1,
- "column": 14
+ "column": 28
}
},
- "name": "w"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 16,
- "end": 30,
- "loc": {
- "start": {
- "line": 1,
- "column": 16
- },
- "end": {
- "line": 1,
- "column": 30
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
"start": 18,
"end": 28,
"loc": {
@@ -188,63 +190,50 @@
"column": 28
}
},
- "expression": {
- "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
"start": 18,
- "end": 28,
+ "end": 24,
"loc": {
"start": {
"line": 1,
"column": 18
},
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "m_null"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
"end": {
"line": 1,
"column": 28
}
},
- "operator": "=",
- "left": {
- "type": "Identifier",
- "start": 18,
- "end": 24,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 24
- }
- },
- "name": "m_null"
- },
- "right": {
- "type": "Identifier",
- "start": 27,
- "end": 28,
- "loc": {
- "start": {
- "line": 1,
- "column": 27
- },
- "end": {
- "line": 1,
- "column": 28
- }
- },
- "name": "w"
- }
+ "name": "w"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/44/expected.json b/test/fixtures/core/uncategorised/44/expected.json
index fa0228a80c..b1dc510c8b 100644
--- a/test/fixtures/core/uncategorised/44/expected.json
+++ b/test/fixtures/core/uncategorised/44/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 13,
"loc": {
@@ -122,7 +122,7 @@
"name": "get"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 11,
"end": 13,
"loc": {
@@ -135,16 +135,18 @@
"column": 13
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/45/expected.json b/test/fixtures/core/uncategorised/45/expected.json
index 360cc1183c..e7eb6404f5 100644
--- a/test/fixtures/core/uncategorised/45/expected.json
+++ b/test/fixtures/core/uncategorised/45/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 13,
"loc": {
@@ -122,7 +122,7 @@
"name": "set"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 11,
"end": 13,
"loc": {
@@ -135,16 +135,18 @@
"column": 13
}
},
- "value": 43,
- "rawValue": 43,
- "raw": "43"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 43,
+ "raw": "43"
+ },
+ "value": 43
+ }
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/46/expected.json b/test/fixtures/core/uncategorised/46/expected.json
index 70440e8cff..777ab9a74e 100644
--- a/test/fixtures/core/uncategorised/46/expected.json
+++ b/test/fixtures/core/uncategorised/46/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 20,
"end": 22,
"loc": {
@@ -56,9 +56,11 @@
"column": 22
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,14 +78,29 @@
"line": 1,
"column": 19
}
- },
- "range": [
- 0,
- 19
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " block comment ",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/466/expected.json b/test/fixtures/core/uncategorised/466/expected.json
new file mode 100644
index 0000000000..4888c9e77c
--- /dev/null
+++ b/test/fixtures/core/uncategorised/466/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 1,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 29,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "expression": {
+ "type": "UnaryExpression",
+ "start": 29,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "operator": "delete",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "name": "i"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/467/expected.json b/test/fixtures/core/uncategorised/467/expected.json
new file mode 100644
index 0000000000..b5c7e063e3
--- /dev/null
+++ b/test/fixtures/core/uncategorised/467/expected.json
@@ -0,0 +1,184 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 1,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "body": [
+ {
+ "type": "WithStatement",
+ "start": 29,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "i"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 37,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/468/expected.json b/test/fixtures/core/uncategorised/468/expected.json
new file mode 100644
index 0000000000..c791058a75
--- /dev/null
+++ b/test/fixtures/core/uncategorised/468/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 32,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 36,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "name": "eval"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 43,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 43
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/469/expected.json b/test/fixtures/core/uncategorised/469/expected.json
new file mode 100644
index 0000000000..d516032ff0
--- /dev/null
+++ b/test/fixtures/core/uncategorised/469/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 32,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 36,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "name": "arguments"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 48,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 48
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/47/expected.json b/test/fixtures/core/uncategorised/47/expected.json
index 972e9a1f34..0955aa94d2 100644
--- a/test/fixtures/core/uncategorised/47/expected.json
+++ b/test/fixtures/core/uncategorised/47/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 2,
"loc": {
@@ -56,9 +56,11 @@
"column": 2
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null,
"trailingComments": null
},
@@ -77,11 +79,7 @@
"line": 1,
"column": 10
}
- },
- "range": [
- 3,
- 10
- ]
+ }
},
{
"type": "CommentBlock",
@@ -97,14 +95,45 @@
"line": 1,
"column": 21
}
- },
- "range": [
- 11,
- 21
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": "The",
+ "start": 3,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "Answer",
+ "start": 11,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/470/expected.json b/test/fixtures/core/uncategorised/470/expected.json
new file mode 100644
index 0000000000..25732f3422
--- /dev/null
+++ b/test/fixtures/core/uncategorised/470/expected.json
@@ -0,0 +1,201 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 32,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 36,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 40,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "name": "eval"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 53,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 53
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/471/expected.json b/test/fixtures/core/uncategorised/471/expected.json
new file mode 100644
index 0000000000..14e6af099e
--- /dev/null
+++ b/test/fixtures/core/uncategorised/471/expected.json
@@ -0,0 +1,201 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 32,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 36,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 40,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "name": "arguments"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 58,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 58
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/472/expected.json b/test/fixtures/core/uncategorised/472/expected.json
new file mode 100644
index 0000000000..5df2fc7306
--- /dev/null
+++ b/test/fixtures/core/uncategorised/472/expected.json
@@ -0,0 +1,184 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 32,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "eval"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 39,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/473/expected.json b/test/fixtures/core/uncategorised/473/expected.json
new file mode 100644
index 0000000000..936555ec42
--- /dev/null
+++ b/test/fixtures/core/uncategorised/473/expected.json
@@ -0,0 +1,184 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 32,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "arguments"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 44,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 44
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/474/expected.json b/test/fixtures/core/uncategorised/474/expected.json
new file mode 100644
index 0000000000..4a54d8d316
--- /dev/null
+++ b/test/fixtures/core/uncategorised/474/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "operator": "++",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 34,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/475/expected.json b/test/fixtures/core/uncategorised/475/expected.json
new file mode 100644
index 0000000000..0be9956ee7
--- /dev/null
+++ b/test/fixtures/core/uncategorised/475/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "operator": "--",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 34,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/476/expected.json b/test/fixtures/core/uncategorised/476/expected.json
new file mode 100644
index 0000000000..3d5a3384b2
--- /dev/null
+++ b/test/fixtures/core/uncategorised/476/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "operator": "++",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 34,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/477/expected.json b/test/fixtures/core/uncategorised/477/expected.json
new file mode 100644
index 0000000000..a129e39f7e
--- /dev/null
+++ b/test/fixtures/core/uncategorised/477/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "operator": "--",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 34,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/478/expected.json b/test/fixtures/core/uncategorised/478/expected.json
new file mode 100644
index 0000000000..7c98807107
--- /dev/null
+++ b/test/fixtures/core/uncategorised/478/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/479/expected.json b/test/fixtures/core/uncategorised/479/expected.json
new file mode 100644
index 0000000000..7db69736d2
--- /dev/null
+++ b/test/fixtures/core/uncategorised/479/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "operator": "--",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/48/expected.json b/test/fixtures/core/uncategorised/48/expected.json
index 48a16dd3ba..df6c839351 100644
--- a/test/fixtures/core/uncategorised/48/expected.json
+++ b/test/fixtures/core/uncategorised/48/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 2,
"loc": {
@@ -56,9 +56,11 @@
"column": 2
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null,
"trailingComments": null
},
@@ -77,11 +79,7 @@
"line": 1,
"column": 10
}
- },
- "range": [
- 3,
- 10
- ]
+ }
},
{
"type": "CommentBlock",
@@ -97,14 +95,45 @@
"line": 1,
"column": 21
}
- },
- "range": [
- 11,
- 21
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": "the",
+ "start": 3,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "answer",
+ "start": 11,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/480/expected.json b/test/fixtures/core/uncategorised/480/expected.json
new file mode 100644
index 0000000000..029e95d4fd
--- /dev/null
+++ b/test/fixtures/core/uncategorised/480/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/481/expected.json b/test/fixtures/core/uncategorised/481/expected.json
new file mode 100644
index 0000000000..fc9fb9e66f
--- /dev/null
+++ b/test/fixtures/core/uncategorised/481/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "operator": "--",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/482/expected.json b/test/fixtures/core/uncategorised/482/expected.json
new file mode 100644
index 0000000000..416268fca0
--- /dev/null
+++ b/test/fixtures/core/uncategorised/482/expected.json
@@ -0,0 +1,170 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 32,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 41,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 48,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 48
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/483/expected.json b/test/fixtures/core/uncategorised/483/expected.json
new file mode 100644
index 0000000000..aeae082c8b
--- /dev/null
+++ b/test/fixtures/core/uncategorised/483/expected.json
@@ -0,0 +1,170 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 32,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 41,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 53,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 53
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/484/expected.json b/test/fixtures/core/uncategorised/484/expected.json
new file mode 100644
index 0000000000..c110e76a57
--- /dev/null
+++ b/test/fixtures/core/uncategorised/484/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 17,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 17,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/485/expected.json b/test/fixtures/core/uncategorised/485/expected.json
new file mode 100644
index 0000000000..817f907aee
--- /dev/null
+++ b/test/fixtures/core/uncategorised/485/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 22,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/486/expected.json b/test/fixtures/core/uncategorised/486/expected.json
new file mode 100644
index 0000000000..ae9e78153d
--- /dev/null
+++ b/test/fixtures/core/uncategorised/486/expected.json
@@ -0,0 +1,204 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 33,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 33,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 49,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/487/expected.json b/test/fixtures/core/uncategorised/487/expected.json
new file mode 100644
index 0000000000..dc709c3172
--- /dev/null
+++ b/test/fixtures/core/uncategorised/487/expected.json
@@ -0,0 +1,204 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 60
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 33,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 33,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 54,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 54
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/488/expected.json b/test/fixtures/core/uncategorised/488/expected.json
new file mode 100644
index 0000000000..1a995ca123
--- /dev/null
+++ b/test/fixtures/core/uncategorised/488/expected.json
@@ -0,0 +1,149 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/489/expected.json b/test/fixtures/core/uncategorised/489/expected.json
new file mode 100644
index 0000000000..34984de2e0
--- /dev/null
+++ b/test/fixtures/core/uncategorised/489/expected.json
@@ -0,0 +1,149 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 22,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 23,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 23,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/49/expected.json b/test/fixtures/core/uncategorised/49/expected.json
index 3571b1a22a..e9267064e8 100644
--- a/test/fixtures/core/uncategorised/49/expected.json
+++ b/test/fixtures/core/uncategorised/49/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 42,
"end": 44,
"loc": {
@@ -56,9 +56,11 @@
"column": 13
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,14 +78,29 @@
"line": 5,
"column": 10
}
- },
- "range": [
- 0,
- 41
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " multiline\ncomment\nshould\nbe\nignored ",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/490/expected.json b/test/fixtures/core/uncategorised/490/expected.json
new file mode 100644
index 0000000000..f6abe3ed03
--- /dev/null
+++ b/test/fixtures/core/uncategorised/490/expected.json
@@ -0,0 +1,240 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 33,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 35,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "s"
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "start": 38,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 54,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 54
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "kind": "init"
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/491/expected.json b/test/fixtures/core/uncategorised/491/expected.json
new file mode 100644
index 0000000000..d0765fadb6
--- /dev/null
+++ b/test/fixtures/core/uncategorised/491/expected.json
@@ -0,0 +1,149 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "package"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 21,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 21,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/492/expected.json b/test/fixtures/core/uncategorised/492/expected.json
new file mode 100644
index 0000000000..c888aaf947
--- /dev/null
+++ b/test/fixtures/core/uncategorised/492/expected.json
@@ -0,0 +1,295 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 33,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 35,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "i"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 38,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 42,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 46,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 46
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "name": "s"
+ },
+ "kind": "set",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 47,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 48,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 48
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 54,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 54
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/493/expected.json b/test/fixtures/core/uncategorised/493/expected.json
new file mode 100644
index 0000000000..bebdcad342
--- /dev/null
+++ b/test/fixtures/core/uncategorised/493/expected.json
@@ -0,0 +1,242 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 33,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 35,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 39,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "name": "s"
+ },
+ "kind": "set",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 40,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 41,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 47,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/494/expected.json b/test/fixtures/core/uncategorised/494/expected.json
new file mode 100644
index 0000000000..d098c6d058
--- /dev/null
+++ b/test/fixtures/core/uncategorised/494/expected.json
@@ -0,0 +1,257 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 64
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 64
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 64
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 64
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 33,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 60
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 35,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "s"
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "start": 38,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "name": "s"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 49,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 55,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 55
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "kind": "init"
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/495/expected.json b/test/fixtures/core/uncategorised/495/expected.json
new file mode 100644
index 0000000000..6aa54306ed
--- /dev/null
+++ b/test/fixtures/core/uncategorised/495/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 22,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/496/expected.json b/test/fixtures/core/uncategorised/496/expected.json
new file mode 100644
index 0000000000..5fbf9ec4b8
--- /dev/null
+++ b/test/fixtures/core/uncategorised/496/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "arguments"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 26,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 27,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 27,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/497/expected.json b/test/fixtures/core/uncategorised/497/expected.json
new file mode 100644
index 0000000000..8425a41fb7
--- /dev/null
+++ b/test/fixtures/core/uncategorised/497/expected.json
@@ -0,0 +1,187 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 33,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "name": "inner"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 48,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 48
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 54,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 54
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/498/expected.json b/test/fixtures/core/uncategorised/498/expected.json
new file mode 100644
index 0000000000..bab5d19160
--- /dev/null
+++ b/test/fixtures/core/uncategorised/498/expected.json
@@ -0,0 +1,187 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 33,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "name": "inner"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 48,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 48
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "name": "arguments"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 59,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 59
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/499/expected.json b/test/fixtures/core/uncategorised/499/expected.json
new file mode 100644
index 0000000000..53489fbf1c
--- /dev/null
+++ b/test/fixtures/core/uncategorised/499/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ },
+ {
+ "type": "Directive",
+ "start": 33,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 33,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "raw": "\"\\1\"",
+ "value": "\\1"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/5/expected.json b/test/fixtures/core/uncategorised/5/expected.json
index 9b766664c8..9311593726 100644
--- a/test/fixtures/core/uncategorised/5/expected.json
+++ b/test/fixtures/core/uncategorised/5/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 0,
"end": 8,
"loc": {
@@ -56,13 +56,14 @@
"column": 8
}
},
- "raw": "/[a-z]/g",
- "regex": {
- "pattern": "[a-z]",
- "flags": "g"
- }
+ "extra": {
+ "raw": "/[a-z]/g"
+ },
+ "pattern": "[a-z]",
+ "flags": "g"
}
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/50/expected.json b/test/fixtures/core/uncategorised/50/expected.json
index b39cabe82a..1bead36e26 100644
--- a/test/fixtures/core/uncategorised/50/expected.json
+++ b/test/fixtures/core/uncategorised/50/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -56,9 +56,11 @@
"column": 6
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,14 +78,29 @@
"line": 2,
"column": 3
}
- },
- "range": [
- 0,
- 7
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": "a\nb",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 3
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/500/expected.json b/test/fixtures/core/uncategorised/500/expected.json
new file mode 100644
index 0000000000..29875fff43
--- /dev/null
+++ b/test/fixtures/core/uncategorised/500/expected.json
@@ -0,0 +1,152 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 33,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 33,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "value": 17,
+ "rawValue": 17,
+ "raw": "021"
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/501/expected.json b/test/fixtures/core/uncategorised/501/expected.json
new file mode 100644
index 0000000000..4e77a05f78
--- /dev/null
+++ b/test/fixtures/core/uncategorised/501/expected.json
@@ -0,0 +1,209 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 33,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 34,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 36,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 36,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "value": "\u0001",
+ "rawValue": "\u0001",
+ "raw": "\"\\1\""
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 42,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "kind": "init"
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/502/expected.json b/test/fixtures/core/uncategorised/502/expected.json
new file mode 100644
index 0000000000..346e059e5f
--- /dev/null
+++ b/test/fixtures/core/uncategorised/502/expected.json
@@ -0,0 +1,209 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 33,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 34,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 36,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "NumberLiteral",
+ "start": 36,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "value": 17,
+ "rawValue": 17,
+ "raw": "021"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 41,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "kind": "init"
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/503/expected.json b/test/fixtures/core/uncategorised/503/expected.json
new file mode 100644
index 0000000000..9f10388176
--- /dev/null
+++ b/test/fixtures/core/uncategorised/503/expected.json
@@ -0,0 +1,203 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 33,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 74
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "name": "inner"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 50,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 50
+ },
+ "end": {
+ "line": 1,
+ "column": 74
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 52,
+ "end": 72,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 52
+ },
+ "end": {
+ "line": 1,
+ "column": 72
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 52,
+ "end": 71,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 52
+ },
+ "end": {
+ "line": 1,
+ "column": 71
+ }
+ },
+ "raw": "\"octal directive\\1\"",
+ "value": "octal directive\\1"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/504/expected.json b/test/fixtures/core/uncategorised/504/expected.json
new file mode 100644
index 0000000000..9e81efccd6
--- /dev/null
+++ b/test/fixtures/core/uncategorised/504/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "name": "implements"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/504/options.json b/test/fixtures/core/uncategorised/504/options.json
index a130c92268..570ca31728 100644
--- a/test/fixtures/core/uncategorised/504/options.json
+++ b/test/fixtures/core/uncategorised/504/options.json
@@ -1,3 +1,3 @@
{
- "throws": "The keyword 'implements' is reserved (1:37)"
-}
\ No newline at end of file
+ "throws": "Binding implements in strict mode (1:37)"
+}
diff --git a/test/fixtures/core/uncategorised/505/expected.json b/test/fixtures/core/uncategorised/505/expected.json
new file mode 100644
index 0000000000..09c95282b4
--- /dev/null
+++ b/test/fixtures/core/uncategorised/505/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "name": "interface"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/505/options.json b/test/fixtures/core/uncategorised/505/options.json
index c70c06968d..dfe4eddc2a 100644
--- a/test/fixtures/core/uncategorised/505/options.json
+++ b/test/fixtures/core/uncategorised/505/options.json
@@ -1,3 +1,3 @@
{
- "throws": "The keyword 'interface' is reserved (1:37)"
-}
\ No newline at end of file
+ "throws": "Binding interface in strict mode (1:37)"
+}
diff --git a/test/fixtures/core/uncategorised/506/expected.json b/test/fixtures/core/uncategorised/506/expected.json
new file mode 100644
index 0000000000..b5b1bf5fba
--- /dev/null
+++ b/test/fixtures/core/uncategorised/506/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "name": "package"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/506/options.json b/test/fixtures/core/uncategorised/506/options.json
index ac7ab9bdb7..766ddb41ca 100644
--- a/test/fixtures/core/uncategorised/506/options.json
+++ b/test/fixtures/core/uncategorised/506/options.json
@@ -1,3 +1,3 @@
{
- "throws": "The keyword 'package' is reserved (1:37)"
-}
\ No newline at end of file
+ "throws": "Binding package in strict mode (1:37)"
+}
diff --git a/test/fixtures/core/uncategorised/507/expected.json b/test/fixtures/core/uncategorised/507/expected.json
new file mode 100644
index 0000000000..bb397becf0
--- /dev/null
+++ b/test/fixtures/core/uncategorised/507/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "name": "private"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/507/options.json b/test/fixtures/core/uncategorised/507/options.json
index 735d540526..9a7c12e0a6 100644
--- a/test/fixtures/core/uncategorised/507/options.json
+++ b/test/fixtures/core/uncategorised/507/options.json
@@ -1,3 +1,3 @@
{
- "throws": "The keyword 'private' is reserved (1:37)"
-}
\ No newline at end of file
+ "throws": "Binding private in strict mode (1:37)"
+}
diff --git a/test/fixtures/core/uncategorised/508/expected.json b/test/fixtures/core/uncategorised/508/expected.json
new file mode 100644
index 0000000000..14ef8d4896
--- /dev/null
+++ b/test/fixtures/core/uncategorised/508/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "name": "protected"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/508/options.json b/test/fixtures/core/uncategorised/508/options.json
index a8145dcb6a..ba43694c8d 100644
--- a/test/fixtures/core/uncategorised/508/options.json
+++ b/test/fixtures/core/uncategorised/508/options.json
@@ -1,3 +1,3 @@
{
- "throws": "The keyword 'protected' is reserved (1:37)"
-}
\ No newline at end of file
+ "throws": "Binding protected in strict mode (1:37)"
+}
diff --git a/test/fixtures/core/uncategorised/509/expected.json b/test/fixtures/core/uncategorised/509/expected.json
new file mode 100644
index 0000000000..e6e08fbf57
--- /dev/null
+++ b/test/fixtures/core/uncategorised/509/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "public"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/509/options.json b/test/fixtures/core/uncategorised/509/options.json
index 232b3cba94..b1dbd863ed 100644
--- a/test/fixtures/core/uncategorised/509/options.json
+++ b/test/fixtures/core/uncategorised/509/options.json
@@ -1,3 +1,3 @@
{
- "throws": "The keyword 'public' is reserved (1:37)"
-}
\ No newline at end of file
+ "throws": "Binding public in strict mode (1:37)"
+}
diff --git a/test/fixtures/core/uncategorised/51/expected.json b/test/fixtures/core/uncategorised/51/expected.json
index 5028451839..4ea801a13a 100644
--- a/test/fixtures/core/uncategorised/51/expected.json
+++ b/test/fixtures/core/uncategorised/51/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -56,9 +56,11 @@
"column": 6
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,14 +78,29 @@
"line": 2,
"column": 3
}
- },
- "range": [
- 0,
- 7
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": "a\rb",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 3
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/510/expected.json b/test/fixtures/core/uncategorised/510/expected.json
new file mode 100644
index 0000000000..a8f07d2a1b
--- /dev/null
+++ b/test/fixtures/core/uncategorised/510/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "static"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/510/options.json b/test/fixtures/core/uncategorised/510/options.json
index 47fe5aafaf..75ad83ddbb 100644
--- a/test/fixtures/core/uncategorised/510/options.json
+++ b/test/fixtures/core/uncategorised/510/options.json
@@ -1,3 +1,3 @@
{
- "throws": "The keyword 'static' is reserved (1:37)"
-}
\ No newline at end of file
+ "throws": "Binding static in strict mode (1:37)"
+}
diff --git a/test/fixtures/core/uncategorised/511/expected.json b/test/fixtures/core/uncategorised/511/expected.json
new file mode 100644
index 0000000000..9454908513
--- /dev/null
+++ b/test/fixtures/core/uncategorised/511/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "static"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 25,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 25,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/512/expected.json b/test/fixtures/core/uncategorised/512/expected.json
new file mode 100644
index 0000000000..42dbd8e915
--- /dev/null
+++ b/test/fixtures/core/uncategorised/512/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "static"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 20,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/513/expected.json b/test/fixtures/core/uncategorised/513/expected.json
new file mode 100644
index 0000000000..e019755823
--- /dev/null
+++ b/test/fixtures/core/uncategorised/513/expected.json
@@ -0,0 +1,118 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "static"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 32,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/513/options.json b/test/fixtures/core/uncategorised/513/options.json
index 07d74757d4..69a9237df8 100644
--- a/test/fixtures/core/uncategorised/513/options.json
+++ b/test/fixtures/core/uncategorised/513/options.json
@@ -1,3 +1,3 @@
{
"throws": "The keyword 'static' is reserved (1:23)"
-}
\ No newline at end of file
+}
diff --git a/test/fixtures/core/uncategorised/514/expected.json b/test/fixtures/core/uncategorised/514/expected.json
new file mode 100644
index 0000000000..51085f798f
--- /dev/null
+++ b/test/fixtures/core/uncategorised/514/expected.json
@@ -0,0 +1,151 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/515/expected.json b/test/fixtures/core/uncategorised/515/expected.json
new file mode 100644
index 0000000000..14824eac9f
--- /dev/null
+++ b/test/fixtures/core/uncategorised/515/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/516/expected.json b/test/fixtures/core/uncategorised/516/expected.json
new file mode 100644
index 0000000000..b18233c76a
--- /dev/null
+++ b/test/fixtures/core/uncategorised/516/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "package"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 22,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/517/expected.json b/test/fixtures/core/uncategorised/517/expected.json
new file mode 100644
index 0000000000..97c6620ab1
--- /dev/null
+++ b/test/fixtures/core/uncategorised/517/expected.json
@@ -0,0 +1,218 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 29,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 38,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "name": "b"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 40,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 43,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 43
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 46,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 46
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "EmptyStatement",
+ "start": 49,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/518/expected.json b/test/fixtures/core/uncategorised/518/expected.json
new file mode 100644
index 0000000000..6b5bcf5c66
--- /dev/null
+++ b/test/fixtures/core/uncategorised/518/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 20,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 20,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/519/expected.json b/test/fixtures/core/uncategorised/519/expected.json
new file mode 100644
index 0000000000..636e4bc049
--- /dev/null
+++ b/test/fixtures/core/uncategorised/519/expected.json
@@ -0,0 +1,221 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 29,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 30,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 39,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "name": "b"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 41,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 44,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 44
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 47,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/52/expected.json b/test/fixtures/core/uncategorised/52/expected.json
index b39cabe82a..1bead36e26 100644
--- a/test/fixtures/core/uncategorised/52/expected.json
+++ b/test/fixtures/core/uncategorised/52/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -56,9 +56,11 @@
"column": 6
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,14 +78,29 @@
"line": 2,
"column": 3
}
- },
- "range": [
- 0,
- 7
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": "a\nb",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 3
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/520/expected.json b/test/fixtures/core/uncategorised/520/expected.json
new file mode 100644
index 0000000000..a4e3e8cbd5
--- /dev/null
+++ b/test/fixtures/core/uncategorised/520/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 20,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/521/expected.json b/test/fixtures/core/uncategorised/521/expected.json
new file mode 100644
index 0000000000..63264f0559
--- /dev/null
+++ b/test/fixtures/core/uncategorised/521/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "package"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 23,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 23,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/522/expected.json b/test/fixtures/core/uncategorised/522/expected.json
new file mode 100644
index 0000000000..45739cd1a5
--- /dev/null
+++ b/test/fixtures/core/uncategorised/522/expected.json
@@ -0,0 +1,270 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 69,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 69
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 69,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 69
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 13,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "foo"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 28,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 28,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "FunctionDeclaration",
+ "start": 42,
+ "end": 69,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 69
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 51,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 51
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "name": "bar"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 56,
+ "end": 69,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 56
+ },
+ "end": {
+ "line": 1,
+ "column": 69
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 57,
+ "end": 68,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 57
+ },
+ "end": {
+ "line": 1,
+ "column": 68
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 61,
+ "end": 68,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 61
+ },
+ "end": {
+ "line": 1,
+ "column": 68
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 61,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 61
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "name": "v"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 65,
+ "end": 68,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 65
+ },
+ "end": {
+ "line": 1,
+ "column": 68
+ }
+ },
+ "value": 13,
+ "rawValue": 13,
+ "raw": "015"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/527/expected.json b/test/fixtures/core/uncategorised/527/expected.json
index 26048dfd5a..719450f6db 100644
--- a/test/fixtures/core/uncategorised/527/expected.json
+++ b/test/fixtures/core/uncategorised/527/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -87,14 +87,17 @@
"column": 10
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
],
"kind": "let"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/528/expected.json b/test/fixtures/core/uncategorised/528/expected.json
index 769f0e0bf2..d67d0ff9c0 100644
--- a/test/fixtures/core/uncategorised/528/expected.json
+++ b/test/fixtures/core/uncategorised/528/expected.json
@@ -74,7 +74,7 @@
"name": "eval"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 11,
"end": 13,
"loc": {
@@ -87,9 +87,11 @@
"column": 13
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
},
{
@@ -123,7 +125,7 @@
"name": "arguments"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 27,
"end": 29,
"loc": {
@@ -136,14 +138,17 @@
"column": 29
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
],
"kind": "let"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/529/expected.json b/test/fixtures/core/uncategorised/529/expected.json
index 72a0f70422..97407a93a7 100644
--- a/test/fixtures/core/uncategorised/529/expected.json
+++ b/test/fixtures/core/uncategorised/529/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -87,9 +87,11 @@
"column": 10
}
},
- "value": 14,
- "rawValue": 14,
- "raw": "14"
+ "extra": {
+ "rawValue": 14,
+ "raw": "14"
+ },
+ "value": 14
}
},
{
@@ -123,7 +125,7 @@
"name": "y"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 16,
"end": 17,
"loc": {
@@ -136,9 +138,11 @@
"column": 17
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
}
},
{
@@ -172,7 +176,7 @@
"name": "z"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 23,
"end": 27,
"loc": {
@@ -185,14 +189,17 @@
"column": 27
}
},
- "value": 1977,
- "rawValue": 1977,
- "raw": "1977"
+ "extra": {
+ "rawValue": 1977,
+ "raw": "1977"
+ },
+ "value": 1977
}
}
],
"kind": "let"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/53/expected.json b/test/fixtures/core/uncategorised/53/expected.json
index 87e3d95851..5ae353a2f6 100644
--- a/test/fixtures/core/uncategorised/53/expected.json
+++ b/test/fixtures/core/uncategorised/53/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -56,9 +56,11 @@
"column": 6
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,14 +78,29 @@
"line": 2,
"column": 3
}
- },
- "range": [
- 0,
- 7
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": "a\nc",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 3
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/530/expected.json b/test/fixtures/core/uncategorised/530/expected.json
index 5f7188a434..c6da62d7c5 100644
--- a/test/fixtures/core/uncategorised/530/expected.json
+++ b/test/fixtures/core/uncategorised/530/expected.json
@@ -88,7 +88,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 13,
"loc": {
@@ -101,9 +101,11 @@
"column": 13
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
}
],
@@ -127,6 +129,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/531/expected.json b/test/fixtures/core/uncategorised/531/expected.json
index e7d044a4ed..161b25fb1e 100644
--- a/test/fixtures/core/uncategorised/531/expected.json
+++ b/test/fixtures/core/uncategorised/531/expected.json
@@ -88,7 +88,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 13,
"loc": {
@@ -101,9 +101,11 @@
"column": 13
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
},
{
@@ -137,7 +139,7 @@
"name": "y"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 19,
"end": 20,
"loc": {
@@ -150,9 +152,11 @@
"column": 20
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
],
@@ -176,6 +180,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/533/expected.json b/test/fixtures/core/uncategorised/533/expected.json
index 7a3105b73c..4069780390 100644
--- a/test/fixtures/core/uncategorised/533/expected.json
+++ b/test/fixtures/core/uncategorised/533/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 12,
"loc": {
@@ -87,14 +87,17 @@
"column": 12
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
],
"kind": "const"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/534/expected.json b/test/fixtures/core/uncategorised/534/expected.json
index 6fe8322ba5..a000184562 100644
--- a/test/fixtures/core/uncategorised/534/expected.json
+++ b/test/fixtures/core/uncategorised/534/expected.json
@@ -74,7 +74,7 @@
"name": "eval"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 13,
"end": 15,
"loc": {
@@ -87,9 +87,11 @@
"column": 15
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
},
{
@@ -123,7 +125,7 @@
"name": "arguments"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 29,
"end": 31,
"loc": {
@@ -136,14 +138,17 @@
"column": 31
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
],
"kind": "const"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/535/expected.json b/test/fixtures/core/uncategorised/535/expected.json
index 8a1741ec4b..a40092b09d 100644
--- a/test/fixtures/core/uncategorised/535/expected.json
+++ b/test/fixtures/core/uncategorised/535/expected.json
@@ -74,7 +74,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 12,
"loc": {
@@ -87,9 +87,11 @@
"column": 12
}
},
- "value": 14,
- "rawValue": 14,
- "raw": "14"
+ "extra": {
+ "rawValue": 14,
+ "raw": "14"
+ },
+ "value": 14
}
},
{
@@ -123,7 +125,7 @@
"name": "y"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 18,
"end": 19,
"loc": {
@@ -136,9 +138,11 @@
"column": 19
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
}
},
{
@@ -172,7 +176,7 @@
"name": "z"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 25,
"end": 29,
"loc": {
@@ -185,14 +189,17 @@
"column": 29
}
},
- "value": 1977,
- "rawValue": 1977,
- "raw": "1977"
+ "extra": {
+ "rawValue": 1977,
+ "raw": "1977"
+ },
+ "value": 1977
}
}
],
"kind": "const"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/536/expected.json b/test/fixtures/core/uncategorised/536/expected.json
new file mode 100644
index 0000000000..050ac2d8b2
--- /dev/null
+++ b/test/fixtures/core/uncategorised/536/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "a"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/537/expected.json b/test/fixtures/core/uncategorised/537/expected.json
index 7a71d52992..7ffb7b7416 100644
--- a/test/fixtures/core/uncategorised/537/expected.json
+++ b/test/fixtures/core/uncategorised/537/expected.json
@@ -88,7 +88,7 @@
"name": "x"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 14,
"end": 15,
"loc": {
@@ -101,9 +101,11 @@
"column": 15
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
}
],
@@ -127,7 +129,7 @@
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/538/expected.json b/test/fixtures/core/uncategorised/538/expected.json
index d17094a6c6..5ba1ffd3fa 100644
--- a/test/fixtures/core/uncategorised/538/expected.json
+++ b/test/fixtures/core/uncategorised/538/expected.json
@@ -57,14 +57,29 @@
"line": 1,
"column": 4
}
- },
- "range": [
- 0,
- 4
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": "",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/54/expected.json b/test/fixtures/core/uncategorised/54/expected.json
index 848acc5805..b94af6a6f3 100644
--- a/test/fixtures/core/uncategorised/54/expected.json
+++ b/test/fixtures/core/uncategorised/54/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 16,
"end": 18,
"loc": {
@@ -56,9 +56,11 @@
"column": 2
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,14 +78,29 @@
"line": 1,
"column": 15
}
- },
- "range": [
- 0,
- 15
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " line comment",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/540/expected.json b/test/fixtures/core/uncategorised/540/expected.json
index 1363375b12..5b46bc550d 100644
--- a/test/fixtures/core/uncategorised/540/expected.json
+++ b/test/fixtures/core/uncategorised/540/expected.json
@@ -88,12 +88,13 @@
"column": 15
}
},
- "body": []
+ "body": [],
+ "directives": []
}
},
"operator": "/",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 18,
"end": 19,
"loc": {
@@ -106,13 +107,18 @@
"column": 19
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/541/expected.json b/test/fixtures/core/uncategorised/541/expected.json
index ece4393a86..f73e4e6988 100644
--- a/test/fixtures/core/uncategorised/541/expected.json
+++ b/test/fixtures/core/uncategorised/541/expected.json
@@ -75,7 +75,8 @@
"column": 15
}
},
- "body": []
+ "body": [],
+ "directives": []
}
},
{
@@ -93,7 +94,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 16,
"end": 21,
"loc": {
@@ -106,13 +107,14 @@
"column": 21
}
},
- "raw": "/ 1 /",
- "regex": {
- "pattern": " 1 ",
- "flags": ""
- }
+ "extra": {
+ "raw": "/ 1 /"
+ },
+ "pattern": " 1 ",
+ "flags": ""
}
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/55/expected.json b/test/fixtures/core/uncategorised/55/expected.json
index 5694227afb..e8663de8a9 100644
--- a/test/fixtures/core/uncategorised/55/expected.json
+++ b/test/fixtures/core/uncategorised/55/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 2,
"loc": {
@@ -56,9 +56,11 @@
"column": 2
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null,
"trailingComments": null
},
@@ -77,14 +79,29 @@
"line": 1,
"column": 18
}
- },
- "range": [
- 3,
- 18
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " line comment",
+ "start": 3,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/56/expected.json b/test/fixtures/core/uncategorised/56/expected.json
index df154b7af9..8ba4e0ec1b 100644
--- a/test/fixtures/core/uncategorised/56/expected.json
+++ b/test/fixtures/core/uncategorised/56/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 17,
"end": 19,
"loc": {
@@ -56,9 +56,11 @@
"column": 2
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,14 +78,29 @@
"line": 1,
"column": 16
}
- },
- "range": [
- 0,
- 16
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Hello, world!",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/57/expected.json b/test/fixtures/core/uncategorised/57/expected.json
index 0966e60e5c..df3b3c2419 100644
--- a/test/fixtures/core/uncategorised/57/expected.json
+++ b/test/fixtures/core/uncategorised/57/expected.json
@@ -28,6 +28,7 @@
},
"sourceType": "script",
"body": [],
+ "directives": [],
"leadingComments": null,
"innerComments": [
{
@@ -44,12 +45,26 @@
"line": 1,
"column": 16
}
- },
- "range": [
- 0,
- 16
- ]
+ }
}
]
- }
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Hello, world!",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/58/expected.json b/test/fixtures/core/uncategorised/58/expected.json
index fe87c3c143..b932885f57 100644
--- a/test/fixtures/core/uncategorised/58/expected.json
+++ b/test/fixtures/core/uncategorised/58/expected.json
@@ -28,6 +28,7 @@
},
"sourceType": "script",
"body": [],
+ "directives": [],
"leadingComments": null,
"innerComments": [
{
@@ -44,12 +45,26 @@
"line": 1,
"column": 16
}
- },
- "range": [
- 0,
- 16
- ]
+ }
}
]
- }
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Hallo, world!",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/59/expected.json b/test/fixtures/core/uncategorised/59/expected.json
index 70cab4ee43..87f7fb03ef 100644
--- a/test/fixtures/core/uncategorised/59/expected.json
+++ b/test/fixtures/core/uncategorised/59/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 3,
"end": 5,
"loc": {
@@ -56,9 +56,11 @@
"column": 2
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,14 +78,29 @@
"line": 1,
"column": 2
}
- },
- "range": [
- 0,
- 2
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": "",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/6/expected.json b/test/fixtures/core/uncategorised/6/expected.json
index 22d4ac246e..44268abd43 100644
--- a/test/fixtures/core/uncategorised/6/expected.json
+++ b/test/fixtures/core/uncategorised/6/expected.json
@@ -71,7 +71,7 @@
}
},
"left": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 1,
"end": 2,
"loc": {
@@ -84,13 +84,15 @@
"column": 2
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
"operator": "+",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 6,
"loc": {
@@ -103,15 +105,19 @@
"column": 6
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
},
"operator": "*",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 11,
"end": 12,
"loc": {
@@ -124,12 +130,15 @@
"column": 12
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/60/expected.json b/test/fixtures/core/uncategorised/60/expected.json
index 665ffa4700..b58673ec8e 100644
--- a/test/fixtures/core/uncategorised/60/expected.json
+++ b/test/fixtures/core/uncategorised/60/expected.json
@@ -28,6 +28,7 @@
},
"sourceType": "script",
"body": [],
+ "directives": [],
"leadingComments": null,
"innerComments": [
{
@@ -44,12 +45,26 @@
"line": 1,
"column": 2
}
- },
- "range": [
- 0,
- 2
- ]
+ }
}
]
- }
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": "",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/61/expected.json b/test/fixtures/core/uncategorised/61/expected.json
index 665ffa4700..b58673ec8e 100644
--- a/test/fixtures/core/uncategorised/61/expected.json
+++ b/test/fixtures/core/uncategorised/61/expected.json
@@ -28,6 +28,7 @@
},
"sourceType": "script",
"body": [],
+ "directives": [],
"leadingComments": null,
"innerComments": [
{
@@ -44,12 +45,26 @@
"line": 1,
"column": 2
}
- },
- "range": [
- 0,
- 2
- ]
+ }
}
]
- }
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": "",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/62/expected.json b/test/fixtures/core/uncategorised/62/expected.json
index b8e255f5e1..2cf6359c5d 100644
--- a/test/fixtures/core/uncategorised/62/expected.json
+++ b/test/fixtures/core/uncategorised/62/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 4,
"end": 6,
"loc": {
@@ -56,9 +56,11 @@
"column": 6
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,14 +78,29 @@
"line": 1,
"column": 4
}
- },
- "range": [
- 0,
- 4
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": "",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/63/expected.json b/test/fixtures/core/uncategorised/63/expected.json
index b28ab11a53..ddafd34d4b 100644
--- a/test/fixtures/core/uncategorised/63/expected.json
+++ b/test/fixtures/core/uncategorised/63/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 37,
"end": 39,
"loc": {
@@ -56,9 +56,11 @@
"column": 2
}
},
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
"value": 42,
- "rawValue": 42,
- "raw": "42",
"leadingComments": null
},
"leadingComments": [
@@ -76,11 +78,7 @@
"line": 1,
"column": 16
}
- },
- "range": [
- 0,
- 16
- ]
+ }
},
{
"type": "CommentLine",
@@ -96,14 +94,45 @@
"line": 3,
"column": 18
}
- },
- "range": [
- 18,
- 36
- ]
+ }
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Hello, world!",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ }
+ },
+ {
+ "type": "CommentLine",
+ "value": " Another hello",
+ "start": 18,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 18
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/64/expected.json b/test/fixtures/core/uncategorised/64/expected.json
index 4b8b974f5f..417e718ef6 100644
--- a/test/fixtures/core/uncategorised/64/expected.json
+++ b/test/fixtures/core/uncategorised/64/expected.json
@@ -136,18 +136,34 @@
"line": 1,
"column": 24
}
- },
- "range": [
- 9,
- 24
- ]
+ }
}
]
}
- ]
+ ],
+ "directives": []
},
"alternate": null
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Some comment",
+ "start": 9,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/65/expected.json b/test/fixtures/core/uncategorised/65/expected.json
index 2ca6132248..346b21d465 100644
--- a/test/fixtures/core/uncategorised/65/expected.json
+++ b/test/fixtures/core/uncategorised/65/expected.json
@@ -137,17 +137,13 @@
"line": 1,
"column": 40
}
- },
- "range": [
- 27,
- 40
- ]
+ }
}
]
}
],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 23,
"end": 25,
"loc": {
@@ -160,13 +156,34 @@
"column": 25
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
]
}
- ]
- }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " perfect ",
+ "start": 27,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/66/expected.json b/test/fixtures/core/uncategorised/66/expected.json
index 3c10744dbc..d50639ea1d 100644
--- a/test/fixtures/core/uncategorised/66/expected.json
+++ b/test/fixtures/core/uncategorised/66/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 1,
"loc": {
@@ -56,11 +56,14 @@
"column": 1
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/67/expected.json b/test/fixtures/core/uncategorised/67/expected.json
index b5ce31672a..7bbd5d6e04 100644
--- a/test/fixtures/core/uncategorised/67/expected.json
+++ b/test/fixtures/core/uncategorised/67/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 1,
"loc": {
@@ -56,11 +56,14 @@
"column": 1
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/68/expected.json b/test/fixtures/core/uncategorised/68/expected.json
index 8197c99729..31f49f4d54 100644
--- a/test/fixtures/core/uncategorised/68/expected.json
+++ b/test/fixtures/core/uncategorised/68/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 1,
"loc": {
@@ -56,11 +56,14 @@
"column": 1
}
},
- "value": 5,
- "rawValue": 5,
- "raw": "5"
+ "extra": {
+ "rawValue": 5,
+ "raw": "5"
+ },
+ "value": 5
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/69/expected.json b/test/fixtures/core/uncategorised/69/expected.json
index c9032e42b5..d507dabac4 100644
--- a/test/fixtures/core/uncategorised/69/expected.json
+++ b/test/fixtures/core/uncategorised/69/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 2,
"loc": {
@@ -56,11 +56,14 @@
"column": 2
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/70/expected.json b/test/fixtures/core/uncategorised/70/expected.json
index 16bb765432..bc9495e7c4 100644
--- a/test/fixtures/core/uncategorised/70/expected.json
+++ b/test/fixtures/core/uncategorised/70/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,11 +56,14 @@
"column": 3
}
},
- "value": 0.14,
- "rawValue": 0.14,
- "raw": ".14"
+ "extra": {
+ "rawValue": 0.14,
+ "raw": ".14"
+ },
+ "value": 0.14
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/71/expected.json b/test/fixtures/core/uncategorised/71/expected.json
index 77caa9f92d..f0d5e69680 100644
--- a/test/fixtures/core/uncategorised/71/expected.json
+++ b/test/fixtures/core/uncategorised/71/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 7,
"loc": {
@@ -56,11 +56,14 @@
"column": 7
}
},
- "value": 3.14159,
- "rawValue": 3.14159,
- "raw": "3.14159"
+ "extra": {
+ "rawValue": 3.14159,
+ "raw": "3.14159"
+ },
+ "value": 3.14159
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/72/expected.json b/test/fixtures/core/uncategorised/72/expected.json
index 0e80f889c4..c60b1b41f8 100644
--- a/test/fixtures/core/uncategorised/72/expected.json
+++ b/test/fixtures/core/uncategorised/72/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 14,
"loc": {
@@ -56,11 +56,14 @@
"column": 14
}
},
- "value": 6.02214179e+23,
- "rawValue": 6.02214179e+23,
- "raw": "6.02214179e+23"
+ "extra": {
+ "rawValue": 6.02214179e+23,
+ "raw": "6.02214179e+23"
+ },
+ "value": 6.02214179e+23
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/73/expected.json b/test/fixtures/core/uncategorised/73/expected.json
index a4929925aa..3c13fede57 100644
--- a/test/fixtures/core/uncategorised/73/expected.json
+++ b/test/fixtures/core/uncategorised/73/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 15,
"loc": {
@@ -56,11 +56,14 @@
"column": 15
}
},
- "value": 1.49241783e-10,
- "rawValue": 1.49241783e-10,
- "raw": "1.492417830e-10"
+ "extra": {
+ "rawValue": 1.49241783e-10,
+ "raw": "1.492417830e-10"
+ },
+ "value": 1.49241783e-10
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/74/expected.json b/test/fixtures/core/uncategorised/74/expected.json
index 80d8d72652..89c0277df0 100644
--- a/test/fixtures/core/uncategorised/74/expected.json
+++ b/test/fixtures/core/uncategorised/74/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,11 +56,14 @@
"column": 3
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0x0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0x0"
+ },
+ "value": 0
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/75/expected.json b/test/fixtures/core/uncategorised/75/expected.json
index 9fbcefb6e6..ff1823f7ed 100644
--- a/test/fixtures/core/uncategorised/75/expected.json
+++ b/test/fixtures/core/uncategorised/75/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 6,
"loc": {
@@ -56,11 +56,14 @@
"column": 6
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0e+100"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0e+100"
+ },
+ "value": 0
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/76/expected.json b/test/fixtures/core/uncategorised/76/expected.json
index 76c1f1c523..6c610fe45d 100644
--- a/test/fixtures/core/uncategorised/76/expected.json
+++ b/test/fixtures/core/uncategorised/76/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 5,
"loc": {
@@ -56,11 +56,14 @@
"column": 5
}
},
- "value": 2748,
- "rawValue": 2748,
- "raw": "0xabc"
+ "extra": {
+ "rawValue": 2748,
+ "raw": "0xabc"
+ },
+ "value": 2748
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/77/expected.json b/test/fixtures/core/uncategorised/77/expected.json
index 0039bb62d0..925c9bd4b5 100644
--- a/test/fixtures/core/uncategorised/77/expected.json
+++ b/test/fixtures/core/uncategorised/77/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 5,
"loc": {
@@ -56,11 +56,14 @@
"column": 5
}
},
- "value": 3567,
- "rawValue": 3567,
- "raw": "0xdef"
+ "extra": {
+ "rawValue": 3567,
+ "raw": "0xdef"
+ },
+ "value": 3567
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/78/expected.json b/test/fixtures/core/uncategorised/78/expected.json
index 34f104d94a..b22782d94a 100644
--- a/test/fixtures/core/uncategorised/78/expected.json
+++ b/test/fixtures/core/uncategorised/78/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -56,11 +56,14 @@
"column": 4
}
},
- "value": 26,
- "rawValue": 26,
- "raw": "0X1A"
+ "extra": {
+ "rawValue": 26,
+ "raw": "0X1A"
+ },
+ "value": 26
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/79/expected.json b/test/fixtures/core/uncategorised/79/expected.json
index 60fe7b9e32..f5b4ed8462 100644
--- a/test/fixtures/core/uncategorised/79/expected.json
+++ b/test/fixtures/core/uncategorised/79/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -56,11 +56,14 @@
"column": 4
}
},
- "value": 16,
- "rawValue": 16,
- "raw": "0x10"
+ "extra": {
+ "rawValue": 16,
+ "raw": "0x10"
+ },
+ "value": 16
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/80/expected.json b/test/fixtures/core/uncategorised/80/expected.json
index 656eba441e..f677a72fed 100644
--- a/test/fixtures/core/uncategorised/80/expected.json
+++ b/test/fixtures/core/uncategorised/80/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 5,
"loc": {
@@ -56,11 +56,14 @@
"column": 5
}
},
- "value": 256,
- "rawValue": 256,
- "raw": "0x100"
+ "extra": {
+ "rawValue": 256,
+ "raw": "0x100"
+ },
+ "value": 256
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/81/expected.json b/test/fixtures/core/uncategorised/81/expected.json
index 0f25cbbe5a..0ad2ff57eb 100644
--- a/test/fixtures/core/uncategorised/81/expected.json
+++ b/test/fixtures/core/uncategorised/81/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -56,11 +56,14 @@
"column": 4
}
},
- "value": 4,
- "rawValue": 4,
- "raw": "0X04"
+ "extra": {
+ "rawValue": 4,
+ "raw": "0X04"
+ },
+ "value": 4
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/82/expected.json b/test/fixtures/core/uncategorised/82/expected.json
index a3d0753826..eb09e24858 100644
--- a/test/fixtures/core/uncategorised/82/expected.json
+++ b/test/fixtures/core/uncategorised/82/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 2,
"loc": {
@@ -56,11 +56,14 @@
"column": 2
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "02"
+ "extra": {
+ "rawValue": 2,
+ "raw": "02"
+ },
+ "value": 2
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/83/expected.json b/test/fixtures/core/uncategorised/83/expected.json
index 775be2d87f..00009bf130 100644
--- a/test/fixtures/core/uncategorised/83/expected.json
+++ b/test/fixtures/core/uncategorised/83/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,11 +56,14 @@
"column": 3
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "012"
+ "extra": {
+ "rawValue": 10,
+ "raw": "012"
+ },
+ "value": 10
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/84/expected.json b/test/fixtures/core/uncategorised/84/expected.json
index 3d5cb353e0..febf934ba3 100644
--- a/test/fixtures/core/uncategorised/84/expected.json
+++ b/test/fixtures/core/uncategorised/84/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -56,11 +56,14 @@
"column": 4
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "0012"
+ "extra": {
+ "rawValue": 10,
+ "raw": "0012"
+ },
+ "value": 10
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/85/expected.json b/test/fixtures/core/uncategorised/85/expected.json
index 8404808409..22a0530be4 100644
--- a/test/fixtures/core/uncategorised/85/expected.json
+++ b/test/fixtures/core/uncategorised/85/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 7,
"loc": {
@@ -42,8 +43,8 @@
"column": 7
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 7,
"loc": {
@@ -57,8 +58,10 @@
}
},
"value": "Hello",
- "rawValue": "Hello",
- "raw": "\"Hello\""
+ "extra": {
+ "raw": "\"Hello\"",
+ "rawValue": "Hello"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/86/expected.json b/test/fixtures/core/uncategorised/86/expected.json
index dcc47b071b..787fa60c46 100644
--- a/test/fixtures/core/uncategorised/86/expected.json
+++ b/test/fixtures/core/uncategorised/86/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 22,
"loc": {
@@ -42,8 +43,8 @@
"column": 22
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 22,
"loc": {
@@ -56,9 +57,11 @@
"column": 22
}
},
- "value": "\n\r\t\u000b\b\f\\'\"\u0000",
- "rawValue": "\n\r\t\u000b\b\f\\'\"\u0000",
- "raw": "\"\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0\""
+ "value": "\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0",
+ "extra": {
+ "raw": "\"\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0\"",
+ "rawValue": "\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/87/expected.json b/test/fixtures/core/uncategorised/87/expected.json
index 6fe6d8067b..34b6834ba8 100644
--- a/test/fixtures/core/uncategorised/87/expected.json
+++ b/test/fixtures/core/uncategorised/87/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 8,
"loc": {
@@ -42,8 +43,8 @@
"column": 8
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 8,
"loc": {
@@ -56,9 +57,11 @@
"column": 8
}
},
- "value": "a",
- "rawValue": "a",
- "raw": "\"\\u0061\""
+ "value": "\\u0061",
+ "extra": {
+ "raw": "\"\\u0061\"",
+ "rawValue": "\\u0061"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/88/expected.json b/test/fixtures/core/uncategorised/88/expected.json
index 6dd6810aa8..969ab3928a 100644
--- a/test/fixtures/core/uncategorised/88/expected.json
+++ b/test/fixtures/core/uncategorised/88/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 6,
"loc": {
@@ -42,8 +43,8 @@
"column": 6
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 6,
"loc": {
@@ -56,9 +57,11 @@
"column": 6
}
},
- "value": "a",
- "rawValue": "a",
- "raw": "\"\\x61\""
+ "value": "\\x61",
+ "extra": {
+ "raw": "\"\\x61\"",
+ "rawValue": "\\x61"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/89/expected.json b/test/fixtures/core/uncategorised/89/expected.json
index 9cfa9faad2..e805ca1d52 100644
--- a/test/fixtures/core/uncategorised/89/expected.json
+++ b/test/fixtures/core/uncategorised/89/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 14,
"loc": {
@@ -42,8 +43,8 @@
"column": 14
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 14,
"loc": {
@@ -56,9 +57,11 @@
"column": 14
}
},
- "value": "Hello\nworld",
- "rawValue": "Hello\nworld",
- "raw": "\"Hello\\nworld\""
+ "value": "Hello\\nworld",
+ "extra": {
+ "raw": "\"Hello\\nworld\"",
+ "rawValue": "Hello\\nworld"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/9/expected.json b/test/fixtures/core/uncategorised/9/expected.json
index 6cae01b125..be72c57c4e 100644
--- a/test/fixtures/core/uncategorised/9/expected.json
+++ b/test/fixtures/core/uncategorised/9/expected.json
@@ -89,7 +89,7 @@
},
"elements": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 8,
"loc": {
@@ -102,14 +102,17 @@
"column": 8
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
]
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/core/uncategorised/90/expected.json b/test/fixtures/core/uncategorised/90/expected.json
index aaafd737c7..4b1cc3a85b 100644
--- a/test/fixtures/core/uncategorised/90/expected.json
+++ b/test/fixtures/core/uncategorised/90/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 14,
"loc": {
@@ -42,8 +43,8 @@
"column": 6
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 14,
"loc": {
@@ -56,9 +57,11 @@
"column": 6
}
},
- "value": "Helloworld",
- "rawValue": "Helloworld",
- "raw": "\"Hello\\\nworld\""
+ "value": "Hello\\\nworld",
+ "extra": {
+ "raw": "\"Hello\\\nworld\"",
+ "rawValue": "Hello\\\nworld"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/91/expected.json b/test/fixtures/core/uncategorised/91/expected.json
index 2e79d5b096..dd074ebc9d 100644
--- a/test/fixtures/core/uncategorised/91/expected.json
+++ b/test/fixtures/core/uncategorised/91/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 15,
"loc": {
@@ -42,8 +43,8 @@
"column": 15
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 15,
"loc": {
@@ -56,9 +57,11 @@
"column": 15
}
},
- "value": "Hello\u0002World",
- "rawValue": "Hello\u0002World",
- "raw": "\"Hello\\02World\""
+ "value": "Hello\\02World",
+ "extra": {
+ "raw": "\"Hello\\02World\"",
+ "rawValue": "Hello\\02World"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/92/expected.json b/test/fixtures/core/uncategorised/92/expected.json
index d25c9ba139..48febf1933 100644
--- a/test/fixtures/core/uncategorised/92/expected.json
+++ b/test/fixtures/core/uncategorised/92/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 16,
"loc": {
@@ -42,8 +43,8 @@
"column": 16
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 16,
"loc": {
@@ -56,9 +57,11 @@
"column": 16
}
},
- "value": "Hello\nWorld",
- "rawValue": "Hello\nWorld",
- "raw": "\"Hello\\012World\""
+ "value": "Hello\\012World",
+ "extra": {
+ "raw": "\"Hello\\012World\"",
+ "rawValue": "Hello\\012World"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/93/expected.json b/test/fixtures/core/uncategorised/93/expected.json
index 806ba7acba..62ede0ff69 100644
--- a/test/fixtures/core/uncategorised/93/expected.json
+++ b/test/fixtures/core/uncategorised/93/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 16,
"loc": {
@@ -42,8 +43,8 @@
"column": 16
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 16,
"loc": {
@@ -56,9 +57,11 @@
"column": 16
}
},
- "value": "HelloRWorld",
- "rawValue": "HelloRWorld",
- "raw": "\"Hello\\122World\""
+ "value": "Hello\\122World",
+ "extra": {
+ "raw": "\"Hello\\122World\"",
+ "rawValue": "Hello\\122World"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/94/expected.json b/test/fixtures/core/uncategorised/94/expected.json
index 5b15026354..2b85f61032 100644
--- a/test/fixtures/core/uncategorised/94/expected.json
+++ b/test/fixtures/core/uncategorised/94/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 17,
"loc": {
@@ -42,8 +43,8 @@
"column": 17
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 17,
"loc": {
@@ -56,9 +57,11 @@
"column": 17
}
},
- "value": "Hello\n2World",
- "rawValue": "Hello\n2World",
- "raw": "\"Hello\\0122World\""
+ "value": "Hello\\0122World",
+ "extra": {
+ "raw": "\"Hello\\0122World\"",
+ "rawValue": "Hello\\0122World"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/95/expected.json b/test/fixtures/core/uncategorised/95/expected.json
index e624d06929..0766d1fb0a 100644
--- a/test/fixtures/core/uncategorised/95/expected.json
+++ b/test/fixtures/core/uncategorised/95/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 16,
"loc": {
@@ -42,8 +43,8 @@
"column": 16
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 16,
"loc": {
@@ -56,9 +57,11 @@
"column": 16
}
},
- "value": "HelloÊWorld",
- "rawValue": "HelloÊWorld",
- "raw": "\"Hello\\312World\""
+ "value": "Hello\\312World",
+ "extra": {
+ "raw": "\"Hello\\312World\"",
+ "rawValue": "Hello\\312World"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/96/expected.json b/test/fixtures/core/uncategorised/96/expected.json
index bd2f1ea9ac..1642f0daa1 100644
--- a/test/fixtures/core/uncategorised/96/expected.json
+++ b/test/fixtures/core/uncategorised/96/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 16,
"loc": {
@@ -42,8 +43,8 @@
"column": 16
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 16,
"loc": {
@@ -56,9 +57,11 @@
"column": 16
}
},
- "value": "Hello!2World",
- "rawValue": "Hello!2World",
- "raw": "\"Hello\\412World\""
+ "value": "Hello\\412World",
+ "extra": {
+ "raw": "\"Hello\\412World\"",
+ "rawValue": "Hello\\412World"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/97/expected.json b/test/fixtures/core/uncategorised/97/expected.json
index 4ae045ff0c..6d7ce11c6a 100644
--- a/test/fixtures/core/uncategorised/97/expected.json
+++ b/test/fixtures/core/uncategorised/97/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 16,
"loc": {
@@ -42,8 +43,8 @@
"column": 16
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 16,
"loc": {
@@ -56,9 +57,11 @@
"column": 16
}
},
- "value": "Hello812World",
- "rawValue": "Hello812World",
- "raw": "\"Hello\\812World\""
+ "value": "Hello\\812World",
+ "extra": {
+ "raw": "\"Hello\\812World\"",
+ "rawValue": "Hello\\812World"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/98/expected.json b/test/fixtures/core/uncategorised/98/expected.json
index 9774cae16c..f68c0082fd 100644
--- a/test/fixtures/core/uncategorised/98/expected.json
+++ b/test/fixtures/core/uncategorised/98/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 16,
"loc": {
@@ -42,8 +43,8 @@
"column": 16
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 16,
"loc": {
@@ -56,9 +57,11 @@
"column": 16
}
},
- "value": "Hello92World",
- "rawValue": "Hello92World",
- "raw": "\"Hello\\712World\""
+ "value": "Hello\\712World",
+ "extra": {
+ "raw": "\"Hello\\712World\"",
+ "rawValue": "Hello\\712World"
+ }
}
}
]
diff --git a/test/fixtures/core/uncategorised/99/expected.json b/test/fixtures/core/uncategorised/99/expected.json
index 09dd15f3b3..a93ba04dd0 100644
--- a/test/fixtures/core/uncategorised/99/expected.json
+++ b/test/fixtures/core/uncategorised/99/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 14,
"loc": {
@@ -42,8 +43,8 @@
"column": 14
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 14,
"loc": {
@@ -56,9 +57,11 @@
"column": 14
}
},
- "value": "Hello\u0000World",
- "rawValue": "Hello\u0000World",
- "raw": "\"Hello\\0World\""
+ "value": "Hello\\0World",
+ "extra": {
+ "raw": "\"Hello\\0World\"",
+ "rawValue": "Hello\\0World"
+ }
}
}
]
diff --git a/test/fixtures/esprima/LICENSE b/test/fixtures/esprima/LICENSE
new file mode 100644
index 0000000000..17557eceb9
--- /dev/null
+++ b/test/fixtures/esprima/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.
+
+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.
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0000/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0000/actual.js
new file mode 100644
index 0000000000..fd33f0ef61
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0000/actual.js
@@ -0,0 +1,2 @@
+{ x
+++y }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0000/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0000/expected.json
new file mode 100644
index 0000000000..bab8079535
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0000/expected.json
@@ -0,0 +1,129 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "x"
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 3
+ }
+ },
+ "operator": "++",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 3
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0001/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0001/actual.js
new file mode 100644
index 0000000000..6823a7ff85
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0001/actual.js
@@ -0,0 +1,2 @@
+{ x
+--y }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0001/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0001/expected.json
new file mode 100644
index 0000000000..e7aa5f92ff
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0001/expected.json
@@ -0,0 +1,129 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "x"
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 3
+ }
+ },
+ "operator": "--",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 3
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/actual.js
new file mode 100644
index 0000000000..7dc79c7a8d
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/actual.js
@@ -0,0 +1 @@
+var x /* comment */;
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json
new file mode 100644
index 0000000000..b80d317427
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json
@@ -0,0 +1,122 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x",
+ "leadingComments": null,
+ "trailingComments": null
+ },
+ "init": null,
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": " comment ",
+ "start": 6,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " comment ",
+ "start": 6,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/actual.js
new file mode 100644
index 0000000000..2f881957fe
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/actual.js
@@ -0,0 +1,2 @@
+{ var x = 14, y = 3
+z; }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json
new file mode 100644
index 0000000000..607612e873
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json
@@ -0,0 +1,203 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 2,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": 14,
+ "raw": "14"
+ },
+ "value": 14
+ }
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 14,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "y"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ }
+ ],
+ "kind": "var"
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 1
+ }
+ },
+ "name": "z"
+ }
+ }
+ ],
+ "directives": []
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/actual.js
new file mode 100644
index 0000000000..a2a0280978
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/actual.js
@@ -0,0 +1,2 @@
+while (true) { continue
+there; }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json
new file mode 100644
index 0000000000..1c02f6ef66
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json
@@ -0,0 +1,130 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "body": [
+ {
+ "type": "ContinueStatement",
+ "start": 15,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "label": null
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 24,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "name": "there"
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/actual.js
new file mode 100644
index 0000000000..40aea02e2c
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/actual.js
@@ -0,0 +1,2 @@
+while (true) { continue // Comment
+there; }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json
new file mode 100644
index 0000000000..675fe056a3
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "body": [
+ {
+ "type": "ContinueStatement",
+ "start": 15,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "label": null,
+ "leadingComments": null,
+ "trailingComments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 24,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 35,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "name": "there",
+ "leadingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 24,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 24,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/actual.js
new file mode 100644
index 0000000000..31cc7daf97
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/actual.js
@@ -0,0 +1,2 @@
+while (true) { continue /* Multiline
+Comment */there; }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json
new file mode 100644
index 0000000000..dfef6b5c50
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "body": [
+ {
+ "type": "ContinueStatement",
+ "start": 15,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "label": null,
+ "leadingComments": null,
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 24,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 47,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "name": "there",
+ "leadingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 24,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 24,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/actual.js
new file mode 100644
index 0000000000..21400a2714
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/actual.js
@@ -0,0 +1,2 @@
+while (true) { break
+there; }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json
new file mode 100644
index 0000000000..2b8d9fef9f
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json
@@ -0,0 +1,130 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "body": [
+ {
+ "type": "BreakStatement",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "label": null
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 21,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "name": "there"
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/actual.js
new file mode 100644
index 0000000000..25f5810894
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/actual.js
@@ -0,0 +1,2 @@
+while (true) { break // Comment
+there; }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json
new file mode 100644
index 0000000000..21c911cbbc
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "body": [
+ {
+ "type": "BreakStatement",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "label": null,
+ "leadingComments": null,
+ "trailingComments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 21,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "name": "there",
+ "leadingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 21,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 21,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/actual.js
new file mode 100644
index 0000000000..df2c682c74
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/actual.js
@@ -0,0 +1,2 @@
+while (true) { break /* Multiline
+Comment */there; }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json
new file mode 100644
index 0000000000..55ac6a29a8
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "body": [
+ {
+ "type": "BreakStatement",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "label": null,
+ "leadingComments": null,
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 21,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 44,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 44,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "name": "there",
+ "leadingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 21,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 21,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/actual.js
new file mode 100644
index 0000000000..0e73a24144
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/actual.js
@@ -0,0 +1,2 @@
+(function(){ return
+x; })
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json
new file mode 100644
index 0000000000..7d4c8d5bb6
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 11,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 13,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "argument": null
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 1
+ }
+ },
+ "name": "x"
+ }
+ }
+ ],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/actual.js
new file mode 100644
index 0000000000..f2651888c1
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/actual.js
@@ -0,0 +1,2 @@
+(function(){ return // Comment
+x; })
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json
new file mode 100644
index 0000000000..f0cf8a4b53
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json
@@ -0,0 +1,192 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 11,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 13,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "argument": null,
+ "leadingComments": null,
+ "trailingComments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 20,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 31,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 1
+ }
+ },
+ "name": "x",
+ "leadingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 20,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 20,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/actual.js
new file mode 100644
index 0000000000..74aa0f55fa
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/actual.js
@@ -0,0 +1,2 @@
+(function(){ return/* Multiline
+Comment */x; })
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json
new file mode 100644
index 0000000000..975bfdf605
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json
@@ -0,0 +1,192 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 11,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 13,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "argument": null,
+ "leadingComments": null,
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 19,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 42,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "name": "x",
+ "leadingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 19,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 19,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0013/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0013/actual.js
new file mode 100644
index 0000000000..1e05557a75
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0013/actual.js
@@ -0,0 +1,2 @@
+{ throw error
+error; }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0013/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0013/expected.json
new file mode 100644
index 0000000000..d55af430c7
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0013/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "start": 2,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "error"
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "name": "error"
+ }
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/actual.js
new file mode 100644
index 0000000000..d400cf220c
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/actual.js
@@ -0,0 +1,2 @@
+{ throw error// Comment
+error; }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json
new file mode 100644
index 0000000000..1340d70360
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json
@@ -0,0 +1,171 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "start": 2,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "error",
+ "leadingComments": null,
+ "trailingComments": null
+ },
+ "trailingComments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 13,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 24,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "name": "error",
+ "leadingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 13,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "directives": []
+ }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentLine",
+ "value": " Comment",
+ "start": 13,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/actual.js b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/actual.js
new file mode 100644
index 0000000000..88ec9f1ed8
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/actual.js
@@ -0,0 +1,2 @@
+{ throw error/* Multiline
+Comment */error; }
diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json
new file mode 100644
index 0000000000..fcf481f414
--- /dev/null
+++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json
@@ -0,0 +1,171 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "start": 2,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "error",
+ "leadingComments": null,
+ "trailingComments": null
+ },
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 13,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 36,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "name": "error",
+ "leadingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 13,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "directives": []
+ }
+ ],
+ "directives": []
+ },
+ "comments": [
+ {
+ "type": "CommentBlock",
+ "value": " Multiline\nComment ",
+ "start": 13,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-const/migrated_0000/actual.js b/test/fixtures/esprima/declaration-const/migrated_0000/actual.js
new file mode 100644
index 0000000000..bf90b1a026
--- /dev/null
+++ b/test/fixtures/esprima/declaration-const/migrated_0000/actual.js
@@ -0,0 +1 @@
+const x = 42
diff --git a/test/fixtures/esprima/declaration-const/migrated_0000/expected.json b/test/fixtures/esprima/declaration-const/migrated_0000/expected.json
new file mode 100644
index 0000000000..4069780390
--- /dev/null
+++ b/test/fixtures/esprima/declaration-const/migrated_0000/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "kind": "const"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-const/migrated_0001/actual.js b/test/fixtures/esprima/declaration-const/migrated_0001/actual.js
new file mode 100644
index 0000000000..88d50d85b5
--- /dev/null
+++ b/test/fixtures/esprima/declaration-const/migrated_0001/actual.js
@@ -0,0 +1 @@
+{ const x = 42 }
diff --git a/test/fixtures/esprima/declaration-const/migrated_0001/expected.json b/test/fixtures/esprima/declaration-const/migrated_0001/expected.json
new file mode 100644
index 0000000000..b6f5990bca
--- /dev/null
+++ b/test/fixtures/esprima/declaration-const/migrated_0001/expected.json
@@ -0,0 +1,121 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 2,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 8,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "kind": "const"
+ }
+ ],
+ "directives": []
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-const/migrated_0002/actual.js b/test/fixtures/esprima/declaration-const/migrated_0002/actual.js
new file mode 100644
index 0000000000..dc4cc9cfd3
--- /dev/null
+++ b/test/fixtures/esprima/declaration-const/migrated_0002/actual.js
@@ -0,0 +1 @@
+{ const x = 14, y = 3, z = 1977 }
diff --git a/test/fixtures/esprima/declaration-const/migrated_0002/expected.json b/test/fixtures/esprima/declaration-const/migrated_0002/expected.json
new file mode 100644
index 0000000000..4618734fda
--- /dev/null
+++ b/test/fixtures/esprima/declaration-const/migrated_0002/expected.json
@@ -0,0 +1,223 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 2,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 8,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": 14,
+ "raw": "14"
+ },
+ "value": 14
+ }
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 16,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "y"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 23,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "z"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 27,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "extra": {
+ "rawValue": 1977,
+ "raw": "1977"
+ },
+ "value": 1977
+ }
+ }
+ ],
+ "kind": "const"
+ }
+ ],
+ "directives": []
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/dupe-param/actual.js b/test/fixtures/esprima/declaration-function/dupe-param/actual.js
new file mode 100644
index 0000000000..3b836d372c
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/dupe-param/actual.js
@@ -0,0 +1 @@
+function a(x, x) {'use strict';}
diff --git a/test/fixtures/esprima/declaration-function/dupe-param/expected.json b/test/fixtures/esprima/declaration-function/dupe-param/expected.json
new file mode 100644
index 0000000000..80306b8cba
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/dupe-param/expected.json
@@ -0,0 +1,151 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "x"
+ },
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/dupe-param/options.json b/test/fixtures/esprima/declaration-function/dupe-param/options.json
new file mode 100644
index 0000000000..e23388601b
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/dupe-param/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:14)"
+}
diff --git a/test/fixtures/esprima/declaration-function/empty-param/actual.js b/test/fixtures/esprima/declaration-function/empty-param/actual.js
new file mode 100644
index 0000000000..860cafa480
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/empty-param/actual.js
@@ -0,0 +1 @@
+function a([], []) {'use strict';}
diff --git a/test/fixtures/esprima/declaration-function/empty-param/expected.json b/test/fixtures/esprima/declaration-function/empty-param/expected.json
new file mode 100644
index 0000000000..554eee01b4
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/empty-param/expected.json
@@ -0,0 +1,154 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 11,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "elements": []
+ },
+ {
+ "type": "ArrayPattern",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "elements": []
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 20,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 20,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": "use strict",
+ "extra": {
+ "raw": "'use strict'",
+ "rawValue": "use strict"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0000/actual.js b/test/fixtures/esprima/declaration-function/migrated_0000/actual.js
new file mode 100644
index 0000000000..58671af140
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0000/actual.js
@@ -0,0 +1 @@
+function hello() { sayHi(); }
diff --git a/test/fixtures/esprima/declaration-function/migrated_0000/expected.json b/test/fixtures/esprima/declaration-function/migrated_0000/expected.json
new file mode 100644
index 0000000000..8de460e887
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0000/expected.json
@@ -0,0 +1,131 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 19,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "sayHi"
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0001/actual.js b/test/fixtures/esprima/declaration-function/migrated_0001/actual.js
new file mode 100644
index 0000000000..bcb22bdb50
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0001/actual.js
@@ -0,0 +1 @@
+function eval() { }
diff --git a/test/fixtures/esprima/declaration-function/migrated_0001/expected.json b/test/fixtures/esprima/declaration-function/migrated_0001/expected.json
new file mode 100644
index 0000000000..d8bcde0844
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0001/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0002/actual.js b/test/fixtures/esprima/declaration-function/migrated_0002/actual.js
new file mode 100644
index 0000000000..fc4384962c
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0002/actual.js
@@ -0,0 +1 @@
+function arguments() { }
diff --git a/test/fixtures/esprima/declaration-function/migrated_0002/expected.json b/test/fixtures/esprima/declaration-function/migrated_0002/expected.json
new file mode 100644
index 0000000000..086e1ef65b
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0002/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0003/actual.js b/test/fixtures/esprima/declaration-function/migrated_0003/actual.js
new file mode 100644
index 0000000000..95368d4da2
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0003/actual.js
@@ -0,0 +1 @@
+function test(t, t) { }
diff --git a/test/fixtures/esprima/declaration-function/migrated_0003/expected.json b/test/fixtures/esprima/declaration-function/migrated_0003/expected.json
new file mode 100644
index 0000000000..c081c978ea
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0003/expected.json
@@ -0,0 +1,116 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "test"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0004/actual.js b/test/fixtures/esprima/declaration-function/migrated_0004/actual.js
new file mode 100644
index 0000000000..bc5fe5b5e8
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0004/actual.js
@@ -0,0 +1 @@
+(function test(t, t) { })
diff --git a/test/fixtures/esprima/declaration-function/migrated_0004/expected.json b/test/fixtures/esprima/declaration-function/migrated_0004/expected.json
new file mode 100644
index 0000000000..a9c517251e
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0004/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "test"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0005/actual.js b/test/fixtures/esprima/declaration-function/migrated_0005/actual.js
new file mode 100644
index 0000000000..54349ae31c
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0005/actual.js
@@ -0,0 +1 @@
+function eval() { function inner() { "use strict" } }
diff --git a/test/fixtures/esprima/declaration-function/migrated_0005/expected.json b/test/fixtures/esprima/declaration-function/migrated_0005/expected.json
new file mode 100644
index 0000000000..5924cefb02
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0005/expected.json
@@ -0,0 +1,173 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 18,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "name": "inner"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 35,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 37,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 37,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "value": "use strict",
+ "extra": {
+ "raw": "\"use strict\"",
+ "rawValue": "use strict"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0006/actual.js b/test/fixtures/esprima/declaration-function/migrated_0006/actual.js
new file mode 100644
index 0000000000..0b2880aaa9
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0006/actual.js
@@ -0,0 +1 @@
+function hello(a) { sayHi(); }
diff --git a/test/fixtures/esprima/declaration-function/migrated_0006/expected.json b/test/fixtures/esprima/declaration-function/migrated_0006/expected.json
new file mode 100644
index 0000000000..3d1b214f48
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0006/expected.json
@@ -0,0 +1,148 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 20,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "sayHi"
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0007/actual.js b/test/fixtures/esprima/declaration-function/migrated_0007/actual.js
new file mode 100644
index 0000000000..8d67f5afb4
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0007/actual.js
@@ -0,0 +1 @@
+function hello(a, b) { sayHi(); }
diff --git a/test/fixtures/esprima/declaration-function/migrated_0007/expected.json b/test/fixtures/esprima/declaration-function/migrated_0007/expected.json
new file mode 100644
index 0000000000..8bc6714852
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0007/expected.json
@@ -0,0 +1,164 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "b"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 23,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 23,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "name": "sayHi"
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0008/actual.js b/test/fixtures/esprima/declaration-function/migrated_0008/actual.js
new file mode 100644
index 0000000000..67366da16c
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0008/actual.js
@@ -0,0 +1 @@
+var hi = function() { sayHi() };
diff --git a/test/fixtures/esprima/declaration-function/migrated_0008/expected.json b/test/fixtures/esprima/declaration-function/migrated_0008/expected.json
new file mode 100644
index 0000000000..6483debdcd
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0008/expected.json
@@ -0,0 +1,165 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "hi"
+ },
+ "init": {
+ "type": "FunctionExpression",
+ "start": 9,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 22,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "sayHi"
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0009/actual.js b/test/fixtures/esprima/declaration-function/migrated_0009/actual.js
new file mode 100644
index 0000000000..5a2a82fb35
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0009/actual.js
@@ -0,0 +1 @@
+var hi = function eval() { };
diff --git a/test/fixtures/esprima/declaration-function/migrated_0009/expected.json b/test/fixtures/esprima/declaration-function/migrated_0009/expected.json
new file mode 100644
index 0000000000..b4b770ef03
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0009/expected.json
@@ -0,0 +1,132 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "hi"
+ },
+ "init": {
+ "type": "FunctionExpression",
+ "start": 9,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 25,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0010/actual.js b/test/fixtures/esprima/declaration-function/migrated_0010/actual.js
new file mode 100644
index 0000000000..4d0ce45e67
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0010/actual.js
@@ -0,0 +1 @@
+var hi = function arguments() { };
diff --git a/test/fixtures/esprima/declaration-function/migrated_0010/expected.json b/test/fixtures/esprima/declaration-function/migrated_0010/expected.json
new file mode 100644
index 0000000000..75abd7b81c
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0010/expected.json
@@ -0,0 +1,132 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "hi"
+ },
+ "init": {
+ "type": "FunctionExpression",
+ "start": 9,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 30,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0011/actual.js b/test/fixtures/esprima/declaration-function/migrated_0011/actual.js
new file mode 100644
index 0000000000..17c1c9bbe9
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0011/actual.js
@@ -0,0 +1 @@
+var hello = function hi() { sayHi() };
diff --git a/test/fixtures/esprima/declaration-function/migrated_0011/expected.json b/test/fixtures/esprima/declaration-function/migrated_0011/expected.json
new file mode 100644
index 0000000000..71c7365c51
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0011/expected.json
@@ -0,0 +1,180 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "hello"
+ },
+ "init": {
+ "type": "FunctionExpression",
+ "start": 12,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "hi"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 26,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 28,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 28,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 28,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "sayHi"
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0012/actual.js b/test/fixtures/esprima/declaration-function/migrated_0012/actual.js
new file mode 100644
index 0000000000..0c3a328272
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0012/actual.js
@@ -0,0 +1 @@
+(function(){})
diff --git a/test/fixtures/esprima/declaration-function/migrated_0012/expected.json b/test/fixtures/esprima/declaration-function/migrated_0012/expected.json
new file mode 100644
index 0000000000..fac0f4b32c
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0012/expected.json
@@ -0,0 +1,88 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 11,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0013/actual.js b/test/fixtures/esprima/declaration-function/migrated_0013/actual.js
new file mode 100644
index 0000000000..3219ae202f
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0013/actual.js
@@ -0,0 +1 @@
+function universe(__proto__) { }
diff --git a/test/fixtures/esprima/declaration-function/migrated_0013/expected.json b/test/fixtures/esprima/declaration-function/migrated_0013/expected.json
new file mode 100644
index 0000000000..e9af076d07
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0013/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "universe"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 18,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "__proto__"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 29,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-function/migrated_0014/actual.js b/test/fixtures/esprima/declaration-function/migrated_0014/actual.js
new file mode 100644
index 0000000000..7e29601a2c
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0014/actual.js
@@ -0,0 +1 @@
+function test() { "use strict" + 42; }
diff --git a/test/fixtures/esprima/declaration-function/migrated_0014/expected.json b/test/fixtures/esprima/declaration-function/migrated_0014/expected.json
new file mode 100644
index 0000000000..b4d8d83676
--- /dev/null
+++ b/test/fixtures/esprima/declaration-function/migrated_0014/expected.json
@@ -0,0 +1,157 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "test"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 18,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 18,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "left": {
+ "type": "StringLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "extra": {
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ },
+ "value": "use strict"
+ },
+ "operator": "+",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 33,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-let/migrated_0000/actual.js b/test/fixtures/esprima/declaration-let/migrated_0000/actual.js
new file mode 100644
index 0000000000..d29e51d21f
--- /dev/null
+++ b/test/fixtures/esprima/declaration-let/migrated_0000/actual.js
@@ -0,0 +1 @@
+let x
diff --git a/test/fixtures/esprima/declaration-let/migrated_0000/expected.json b/test/fixtures/esprima/declaration-let/migrated_0000/expected.json
new file mode 100644
index 0000000000..9e7caa0016
--- /dev/null
+++ b/test/fixtures/esprima/declaration-let/migrated_0000/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "init": null
+ }
+ ],
+ "kind": "let"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-let/migrated_0001/actual.js b/test/fixtures/esprima/declaration-let/migrated_0001/actual.js
new file mode 100644
index 0000000000..eb76ecd156
--- /dev/null
+++ b/test/fixtures/esprima/declaration-let/migrated_0001/actual.js
@@ -0,0 +1 @@
+{ let x }
diff --git a/test/fixtures/esprima/declaration-let/migrated_0001/expected.json b/test/fixtures/esprima/declaration-let/migrated_0001/expected.json
new file mode 100644
index 0000000000..1e0f4d8fa5
--- /dev/null
+++ b/test/fixtures/esprima/declaration-let/migrated_0001/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 2,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "init": null
+ }
+ ],
+ "kind": "let"
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-let/migrated_0002/actual.js b/test/fixtures/esprima/declaration-let/migrated_0002/actual.js
new file mode 100644
index 0000000000..f74da40ece
--- /dev/null
+++ b/test/fixtures/esprima/declaration-let/migrated_0002/actual.js
@@ -0,0 +1 @@
+{ let x = 42 }
diff --git a/test/fixtures/esprima/declaration-let/migrated_0002/expected.json b/test/fixtures/esprima/declaration-let/migrated_0002/expected.json
new file mode 100644
index 0000000000..8e0f3eda0b
--- /dev/null
+++ b/test/fixtures/esprima/declaration-let/migrated_0002/expected.json
@@ -0,0 +1,121 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 2,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/declaration-let/migrated_0003/actual.js b/test/fixtures/esprima/declaration-let/migrated_0003/actual.js
new file mode 100644
index 0000000000..d0dbf07f59
--- /dev/null
+++ b/test/fixtures/esprima/declaration-let/migrated_0003/actual.js
@@ -0,0 +1 @@
+{ let x = 14, y = 3, z = 1977 }
diff --git a/test/fixtures/esprima/declaration-let/migrated_0003/expected.json b/test/fixtures/esprima/declaration-let/migrated_0003/expected.json
new file mode 100644
index 0000000000..a64ced02ce
--- /dev/null
+++ b/test/fixtures/esprima/declaration-let/migrated_0003/expected.json
@@ -0,0 +1,223 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 2,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": 14,
+ "raw": "14"
+ },
+ "value": 14
+ }
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 14,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "y"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 21,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "z"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 25,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "extra": {
+ "rawValue": 1977,
+ "raw": "1977"
+ },
+ "value": 1977
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/directive-prolog/migrated_0000/actual.js b/test/fixtures/esprima/directive-prolog/migrated_0000/actual.js
new file mode 100644
index 0000000000..ce29451593
--- /dev/null
+++ b/test/fixtures/esprima/directive-prolog/migrated_0000/actual.js
@@ -0,0 +1 @@
+(function () { 'use\x20strict'; with (i); }())
diff --git a/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json b/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json
new file mode 100644
index 0000000000..c6d4b5de2b
--- /dev/null
+++ b/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json
@@ -0,0 +1,187 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 1,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "body": [
+ {
+ "type": "WithStatement",
+ "start": 32,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 38,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "name": "i"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 40,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "value": "use\\x20strict",
+ "extra": {
+ "raw": "'use\\x20strict'",
+ "rawValue": "use\\x20strict"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/directive-prolog/migrated_0001/actual.js b/test/fixtures/esprima/directive-prolog/migrated_0001/actual.js
new file mode 100644
index 0000000000..f5269df4aa
--- /dev/null
+++ b/test/fixtures/esprima/directive-prolog/migrated_0001/actual.js
@@ -0,0 +1 @@
+(function () { 'use\nstrict'; with (i); }())
diff --git a/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json b/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json
new file mode 100644
index 0000000000..1acd32f8f8
--- /dev/null
+++ b/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json
@@ -0,0 +1,187 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 1,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "WithStatement",
+ "start": 30,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "name": "i"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 38,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": "use\\nstrict",
+ "extra": {
+ "raw": "'use\\nstrict'",
+ "rawValue": "use\\nstrict"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/actual.js b/test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/actual.js
new file mode 100644
index 0000000000..6042292866
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/actual.js
@@ -0,0 +1 @@
+([a,...b,])=>0;
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/expected.json
new file mode 100644
index 0000000000..aa98014263
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 1,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "RestElement",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "b"
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "Literal",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "value": 0,
+ "rawValue": 0,
+ "raw": "0"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/options.json b/test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/actual.js b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/actual.js
new file mode 100644
index 0000000000..17678772eb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/actual.js
@@ -0,0 +1 @@
+([a]) => [0];
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json
new file mode 100644
index 0000000000..55e7cb964b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json
@@ -0,0 +1,139 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 1,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "a"
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "ArrayExpression",
+ "start": 9,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "elements": [
+ {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/actual.js b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/actual.js
new file mode 100644
index 0000000000..0fe9b0cd71
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/actual.js
@@ -0,0 +1 @@
+([a,b])=>0;
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json
new file mode 100644
index 0000000000..1162212f88
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 1,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "b"
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/actual.js b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/actual.js
new file mode 100644
index 0000000000..05fb54993f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/actual.js
@@ -0,0 +1 @@
+([a,...b])=>0;
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json
new file mode 100644
index 0000000000..c7416244d2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json
@@ -0,0 +1,153 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 1,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "RestElement",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "b"
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/actual.js b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/actual.js
new file mode 100644
index 0000000000..49f16d5171
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/actual.js
@@ -0,0 +1 @@
+([])=>0;
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json
new file mode 100644
index 0000000000..bd5854bcd0
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 1,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "elements": []
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/elision/actual.js b/test/fixtures/esprima/es2015-array-binding-pattern/elision/actual.js
new file mode 100644
index 0000000000..f5e9538ab1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/elision/actual.js
@@ -0,0 +1 @@
+([,,])=>0
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json
new file mode 100644
index 0000000000..6eba052f46
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json
@@ -0,0 +1,108 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 1,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "elements": [
+ null,
+ null
+ ]
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/actual.js b/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/actual.js
new file mode 100644
index 0000000000..1bd2fdef70
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/actual.js
@@ -0,0 +1 @@
+([a,[b],...b])=>0;
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/expected.json
new file mode 100644
index 0000000000..73fc92e40b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/expected.json
@@ -0,0 +1,183 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 1,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "ArrayPattern",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "b"
+ }
+ ]
+ },
+ {
+ "type": "RestElement",
+ "start": 8,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "b"
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "Literal",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "value": 0,
+ "rawValue": 0,
+ "raw": "0"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/options.json b/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/options.json
new file mode 100644
index 0000000000..34197d2efe
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:11)"
+}
diff --git a/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/actual.js b/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/actual.js
new file mode 100644
index 0000000000..276ef3b4da
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/actual.js
@@ -0,0 +1,2 @@
+"use strict";
+function a([a,a]){ }
diff --git a/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/expected.json b/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/expected.json
new file mode 100644
index 0000000000..65f0476c0e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/expected.json
@@ -0,0 +1,168 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 25,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 26,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 28,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 14
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "name": "a"
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 31,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/options.json b/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/options.json
new file mode 100644
index 0000000000..d498cd8bd0
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (2:14)"
+}
diff --git a/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/actual.js b/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/actual.js
new file mode 100644
index 0000000000..bf5cca2904
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/actual.js
@@ -0,0 +1,2 @@
+"use strict";
+function a([a,...a]){ }
diff --git a/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/expected.json b/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/expected.json
new file mode 100644
index 0000000000..3497e91ca6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/expected.json
@@ -0,0 +1,183 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 25,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 26,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "RestElement",
+ "start": 28,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 14
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 34,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 20
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/options.json b/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/options.json
new file mode 100644
index 0000000000..e3176a8e57
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (2:17)"
+}
diff --git a/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/actual.js b/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/actual.js
new file mode 100644
index 0000000000..930726974e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/actual.js
@@ -0,0 +1,2 @@
+"use strict";
+function a([{a},...a]){ }
diff --git a/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/expected.json b/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/expected.json
new file mode 100644
index 0000000000..89963bdc09
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/expected.json
@@ -0,0 +1,235 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 25,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "elements": [
+ {
+ "type": "ObjectPattern",
+ "start": 26,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 27,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "name": "a"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ },
+ {
+ "type": "RestElement",
+ "start": 30,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 16
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 36,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 22
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/options.json b/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/options.json
new file mode 100644
index 0000000000..2d74a95450
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (2:19)"
+}
diff --git a/test/fixtures/esprima/es2015-array-pattern/elision/actual.js b/test/fixtures/esprima/es2015-array-pattern/elision/actual.js
new file mode 100644
index 0000000000..d8bb636425
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/elision/actual.js
@@ -0,0 +1 @@
+let [a,] = 0;
diff --git a/test/fixtures/esprima/es2015-array-pattern/elision/expected.json b/test/fixtures/esprima/es2015-array-pattern/elision/expected.json
new file mode 100644
index 0000000000..f426e72528
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/elision/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "ArrayPattern",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ }
+ ]
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-catch-param/actual.js b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-catch-param/actual.js
new file mode 100644
index 0000000000..5d4f5ddda4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-catch-param/actual.js
@@ -0,0 +1 @@
+try { } catch ([]) {}
diff --git a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-catch-param/expected.json b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-catch-param/expected.json
new file mode 100644
index 0000000000..85e1ffb837
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-catch-param/expected.json
@@ -0,0 +1,113 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "body": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 8,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "param": {
+ "type": "ArrayPattern",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "elements": []
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-fn/actual.js b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-fn/actual.js
new file mode 100644
index 0000000000..61b45b94bc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-fn/actual.js
@@ -0,0 +1 @@
+function a([]) {}
diff --git a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-fn/expected.json b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-fn/expected.json
new file mode 100644
index 0000000000..495f1eefe4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-fn/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 11,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "elements": []
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-lexical/actual.js b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-lexical/actual.js
new file mode 100644
index 0000000000..62ca18957d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-lexical/actual.js
@@ -0,0 +1 @@
+let [] = [];
diff --git a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-lexical/expected.json b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-lexical/expected.json
new file mode 100644
index 0000000000..969c550a6a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-lexical/expected.json
@@ -0,0 +1,98 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "id": {
+ "type": "ArrayPattern",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "elements": []
+ },
+ "init": {
+ "type": "ArrayExpression",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "elements": []
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/actual.js b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/actual.js
new file mode 100644
index 0000000000..256529bc21
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/actual.js
@@ -0,0 +1 @@
+var [] = 0;
diff --git a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json
new file mode 100644
index 0000000000..821296cbdb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": {
+ "type": "ArrayPattern",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "elements": []
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/hole/actual.js b/test/fixtures/esprima/es2015-array-pattern/hole/actual.js
new file mode 100644
index 0000000000..76fe814bc5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/hole/actual.js
@@ -0,0 +1 @@
+let [a,,b]=0
diff --git a/test/fixtures/esprima/es2015-array-pattern/hole/expected.json b/test/fixtures/esprima/es2015-array-pattern/hole/expected.json
new file mode 100644
index 0000000000..e267a31f66
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/hole/expected.json
@@ -0,0 +1,137 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "ArrayPattern",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ },
+ null,
+ {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "b"
+ }
+ ]
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/nested-pattern/actual.js b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/actual.js
new file mode 100644
index 0000000000..88a3177b3b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/actual.js
@@ -0,0 +1 @@
+let [[]]=0
diff --git a/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json
new file mode 100644
index 0000000000..59b556c0f5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": {
+ "type": "ArrayPattern",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 5,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "elements": []
+ }
+ ]
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/actual.js b/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/actual.js
new file mode 100644
index 0000000000..417d6fc849
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/actual.js
@@ -0,0 +1 @@
+try {} catch ([a,a]) {}
diff --git a/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/expected.json b/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/expected.json
new file mode 100644
index 0000000000..5752809413
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/expected.json
@@ -0,0 +1,146 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "body": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 7,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "param": {
+ "type": "ArrayPattern",
+ "start": 14,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "a"
+ }
+ ]
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json b/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json
new file mode 100644
index 0000000000..7d5bec6e9b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:17)"
+}
diff --git a/test/fixtures/esprima/es2015-array-pattern/patterned-catch/actual.js b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/actual.js
new file mode 100644
index 0000000000..4197eb461e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/actual.js
@@ -0,0 +1 @@
+try {} catch ([a,b, {c, d:e=0, [f]:g=0, h=i}]) {}
diff --git a/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json
new file mode 100644
index 0000000000..a0efeec910
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json
@@ -0,0 +1,467 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 7,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "param": {
+ "type": "ArrayPattern",
+ "start": 14,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "b"
+ },
+ {
+ "type": "ObjectPattern",
+ "start": 20,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "c"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "c"
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 24,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "d"
+ },
+ "value": {
+ "type": "AssignmentPattern",
+ "start": 26,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 26,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "e"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 28,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 31,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": true,
+ "key": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "f"
+ },
+ "value": {
+ "type": "AssignmentPattern",
+ "start": 35,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "g"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 37,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 40,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 40,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "h"
+ },
+ "value": {
+ "type": "AssignmentPattern",
+ "start": 40,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 40,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "h"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "i"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 47,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/rest/actual.js b/test/fixtures/esprima/es2015-array-pattern/rest/actual.js
new file mode 100644
index 0000000000..3fd6f16faa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/rest/actual.js
@@ -0,0 +1 @@
+let [...a] = 0;
diff --git a/test/fixtures/esprima/es2015-array-pattern/rest/expected.json b/test/fixtures/esprima/es2015-array-pattern/rest/expected.json
new file mode 100644
index 0000000000..18936fbfdf
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/rest/expected.json
@@ -0,0 +1,135 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": {
+ "type": "ArrayPattern",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "elements": [
+ {
+ "type": "RestElement",
+ "start": 5,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/tailing-hold/actual.js b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/actual.js
new file mode 100644
index 0000000000..7e1ac75714
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/actual.js
@@ -0,0 +1 @@
+let [a,,]=0
diff --git a/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json
new file mode 100644
index 0000000000..ef275391a1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json
@@ -0,0 +1,121 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "id": {
+ "type": "ArrayPattern",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ },
+ null
+ ]
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/actual.js b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/actual.js
new file mode 100644
index 0000000000..ff120cf6cd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/actual.js
@@ -0,0 +1 @@
+try { } catch ([a] = []) { }
diff --git a/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/options.json b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/options.json
new file mode 100644
index 0000000000..1e730e1707
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:19)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/actual.js b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/actual.js
new file mode 100644
index 0000000000..0b02d2f86c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/actual.js
@@ -0,0 +1 @@
+try { } catch ([a = 0]) { }
diff --git a/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json
new file mode 100644
index 0000000000..acbfab9cf7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json
@@ -0,0 +1,168 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 8,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "param": {
+ "type": "ArrayPattern",
+ "start": 15,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "elements": [
+ {
+ "type": "AssignmentPattern",
+ "start": 16,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ]
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 24,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/with-default-fn/actual.js b/test/fixtures/esprima/es2015-array-pattern/with-default-fn/actual.js
new file mode 100644
index 0000000000..e74ff47ece
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/with-default-fn/actual.js
@@ -0,0 +1 @@
+function a([a=0]) {}
diff --git a/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json b/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json
new file mode 100644
index 0000000000..75d5b40cd2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json
@@ -0,0 +1,154 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 11,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "elements": [
+ {
+ "type": "AssignmentPattern",
+ "start": 12,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/actual.js b/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/actual.js
new file mode 100644
index 0000000000..c20b838021
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/actual.js
@@ -0,0 +1 @@
+let [{a}] = 0
diff --git a/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json b/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json
new file mode 100644
index 0000000000..1c46501964
--- /dev/null
+++ b/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json
@@ -0,0 +1,171 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": {
+ "type": "ArrayPattern",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "elements": [
+ {
+ "type": "ObjectPattern",
+ "start": 5,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/actual.js b/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/actual.js
new file mode 100644
index 0000000000..de1208284b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/actual.js
@@ -0,0 +1 @@
+(a ...b) => 0
diff --git a/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/options.json b/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/options.json
new file mode 100644
index 0000000000..3b5e811628
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/actual.js b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/actual.js
new file mode 100644
index 0000000000..61d7f20525
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/actual.js
@@ -0,0 +1 @@
+(a,b,...c) => 0;
diff --git a/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json
new file mode 100644
index 0000000000..64ca19741f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json
@@ -0,0 +1,152 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 3,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "b"
+ },
+ {
+ "type": "RestElement",
+ "start": 5,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "c"
+ }
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/actual.js b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/actual.js
new file mode 100644
index 0000000000..7d8f773fc2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/actual.js
@@ -0,0 +1 @@
+(...a, ...b) => 0
diff --git a/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/actual.js b/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/actual.js
new file mode 100644
index 0000000000..db6e46e4e2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/actual.js
@@ -0,0 +1 @@
+(...a) => 0
diff --git a/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json b/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json
new file mode 100644
index 0000000000..fa50513676
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "RestElement",
+ "start": 1,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "a"
+ }
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/actual.js b/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/actual.js
new file mode 100644
index 0000000000..ed8b57eb04
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/actual.js
@@ -0,0 +1 @@
+(a,...[a]) => 0;
diff --git a/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json b/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json
new file mode 100644
index 0000000000..158f0af7b4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:6)"
+}
diff --git a/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/actual.js b/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/actual.js
new file mode 100644
index 0000000000..edd030d19c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/actual.js
@@ -0,0 +1 @@
+(x, x) => y;
diff --git a/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/options.json b/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/options.json
new file mode 100644
index 0000000000..0590c2b7e6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:4)"
+}
diff --git a/test/fixtures/esprima/es2015-arrow-function/invalid-line-terminator-arrow/actual.js b/test/fixtures/esprima/es2015-arrow-function/invalid-line-terminator-arrow/actual.js
new file mode 100644
index 0000000000..efc10aad8b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/invalid-line-terminator-arrow/actual.js
@@ -0,0 +1,2 @@
+()
+=> 42
diff --git a/test/fixtures/esprima/es2015-arrow-function/invalid-line-terminator-arrow/options.json b/test/fixtures/esprima/es2015-arrow-function/invalid-line-terminator-arrow/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/invalid-line-terminator-arrow/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/actual.js b/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/actual.js
new file mode 100644
index 0000000000..5087dd1250
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/actual.js
@@ -0,0 +1 @@
+eval => {"use strict"};
diff --git a/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/expected.json b/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/expected.json
new file mode 100644
index 0000000000..28f8776321
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 8,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 9,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 9,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/options.json b/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/options.json
new file mode 100644
index 0000000000..811d429e63
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0000/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/actual.js
new file mode 100644
index 0000000000..9bd20e6306
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/actual.js
@@ -0,0 +1 @@
+() => "test"
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json
new file mode 100644
index 0000000000..6b22652418
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json
@@ -0,0 +1,88 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [],
+ "body": {
+ "type": "StringLiteral",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": "test",
+ "raw": "\"test\""
+ },
+ "value": "test"
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0001/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/actual.js
new file mode 100644
index 0000000000..66e7d77f82
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/actual.js
@@ -0,0 +1 @@
+e => "test"
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json
new file mode 100644
index 0000000000..070478ffa3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "e"
+ }
+ ],
+ "body": {
+ "type": "StringLiteral",
+ "start": 5,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "extra": {
+ "rawValue": "test",
+ "raw": "\"test\""
+ },
+ "value": "test"
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0002/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/actual.js
new file mode 100644
index 0000000000..492abecbb4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/actual.js
@@ -0,0 +1 @@
+(e) => "test"
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json
new file mode 100644
index 0000000000..71885e218e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "e"
+ }
+ ],
+ "body": {
+ "type": "StringLiteral",
+ "start": 7,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": "test",
+ "raw": "\"test\""
+ },
+ "value": "test"
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0003/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/actual.js
new file mode 100644
index 0000000000..fb2bcd3a3f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/actual.js
@@ -0,0 +1 @@
+(a, b) => "test"
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json
new file mode 100644
index 0000000000..57366e881f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json
@@ -0,0 +1,121 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "b"
+ }
+ ],
+ "body": {
+ "type": "StringLiteral",
+ "start": 10,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "extra": {
+ "rawValue": "test",
+ "raw": "\"test\""
+ },
+ "value": "test"
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0004/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/actual.js
new file mode 100644
index 0000000000..7832f00157
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/actual.js
@@ -0,0 +1 @@
+e => { 42; }
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json
new file mode 100644
index 0000000000..a6acfabee4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "e"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 5,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 7,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 7,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0005/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/actual.js
new file mode 100644
index 0000000000..8cae73b669
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/actual.js
@@ -0,0 +1 @@
+e => ({ property: 42 })
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json
new file mode 100644
index 0000000000..8025e7a342
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json
@@ -0,0 +1,159 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "e"
+ }
+ ],
+ "body": {
+ "type": "ObjectExpression",
+ "start": 6,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 8,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "property"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0006/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/actual.js
new file mode 100644
index 0000000000..a315e257aa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/actual.js
@@ -0,0 +1 @@
+e => { label: 42 }
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json
new file mode 100644
index 0000000000..fe17cfad68
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "e"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 5,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "body": [
+ {
+ "type": "LabeledStatement",
+ "start": 7,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 14,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "label"
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0007/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/actual.js
new file mode 100644
index 0000000000..1de9f227d2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/actual.js
@@ -0,0 +1 @@
+(a, b) => { 42; }
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json
new file mode 100644
index 0000000000..59f0dbf100
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json
@@ -0,0 +1,154 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "b"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 10,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 12,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0008/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/actual.js
new file mode 100644
index 0000000000..7d3f13df4b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/actual.js
@@ -0,0 +1 @@
+(x=1) => x * x
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json
new file mode 100644
index 0000000000..1d3eb7338f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json
@@ -0,0 +1,168 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 1,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 3,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
+ }
+ ],
+ "body": {
+ "type": "BinaryExpression",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "x"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0009/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/actual.js
new file mode 100644
index 0000000000..d1cf60fd7e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/actual.js
@@ -0,0 +1 @@
+eval => 42
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json
new file mode 100644
index 0000000000..b4e861da61
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0010/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/actual.js
new file mode 100644
index 0000000000..c2c0225fe2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/actual.js
@@ -0,0 +1 @@
+arguments => 42
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json
new file mode 100644
index 0000000000..f3bbc75306
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "arguments"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 13,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0011/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/actual.js
new file mode 100644
index 0000000000..c8cc6f33f2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/actual.js
@@ -0,0 +1 @@
+(a) => 00
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json
new file mode 100644
index 0000000000..98652468ab
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 7,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "00"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0012/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/actual.js
new file mode 100644
index 0000000000..2cd3cc4073
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/actual.js
@@ -0,0 +1 @@
+(eval, a) => 42
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json
new file mode 100644
index 0000000000..d4be8b7577
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json
@@ -0,0 +1,121 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "eval"
+ },
+ {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 13,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0013/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/actual.js
new file mode 100644
index 0000000000..8bfa1d67ec
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/actual.js
@@ -0,0 +1 @@
+(eval = 10) => 42
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json
new file mode 100644
index 0000000000..8a08def13e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json
@@ -0,0 +1,140 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 1,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 1,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "eval"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0014/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/actual.js
new file mode 100644
index 0000000000..1c47ed256a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/actual.js
@@ -0,0 +1 @@
+(eval, a = 10) => 42
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json
new file mode 100644
index 0000000000..b782563eff
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json
@@ -0,0 +1,156 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "eval"
+ },
+ {
+ "type": "AssignmentPattern",
+ "start": 7,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 11,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0015/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0015/actual.js
new file mode 100644
index 0000000000..0d4a5ed958
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0015/actual.js
@@ -0,0 +1 @@
+(x => x)
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json
new file mode 100644
index 0000000000..b565e367ee
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json
@@ -0,0 +1,104 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 1,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0016/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/actual.js
new file mode 100644
index 0000000000..48deea86cf
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/actual.js
@@ -0,0 +1 @@
+x => y => 42
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json
new file mode 100644
index 0000000000..3fc7b625b7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json
@@ -0,0 +1,141 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "ArrowFunctionExpression",
+ "start": 5,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0017/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0017/actual.js
new file mode 100644
index 0000000000..a243c8ba58
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0017/actual.js
@@ -0,0 +1 @@
+(x) => ((y, z) => (x, y, z))
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json
new file mode 100644
index 0000000000..7d5558cdaf
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json
@@ -0,0 +1,208 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "ArrowFunctionExpression",
+ "start": 8,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "y"
+ },
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "z"
+ }
+ ],
+ "body": {
+ "type": "SequenceExpression",
+ "start": 19,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expressions": [
+ {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "x"
+ },
+ {
+ "type": "Identifier",
+ "start": 22,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "y"
+ },
+ {
+ "type": "Identifier",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "name": "z"
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0018/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0018/actual.js
new file mode 100644
index 0000000000..62aef02bfd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0018/actual.js
@@ -0,0 +1 @@
+foo(() => {})
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0018/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0018/expected.json
new file mode 100644
index 0000000000..001ee4b78f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0018/expected.json
@@ -0,0 +1,116 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "foo"
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "start": 4,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 10,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0019/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0019/actual.js
new file mode 100644
index 0000000000..90023d1be8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0019/actual.js
@@ -0,0 +1 @@
+foo((x, y) => {})
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0019/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0019/expected.json
new file mode 100644
index 0000000000..6abd542b88
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0019/expected.json
@@ -0,0 +1,149 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "foo"
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "start": 4,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "x"
+ },
+ {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "y"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0020/actual.js b/test/fixtures/esprima/es2015-arrow-function/migrated_0020/actual.js
new file mode 100644
index 0000000000..3222faced0
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0020/actual.js
@@ -0,0 +1 @@
+(sun) => earth
diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0020/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0020/expected.json
new file mode 100644
index 0000000000..c0edf43c28
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0020/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "sun"
+ }
+ ],
+ "body": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "earth"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-arrow/actual.js b/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-arrow/actual.js
new file mode 100644
index 0000000000..487bb99ecf
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-arrow/actual.js
@@ -0,0 +1 @@
+((a)) => 0
diff --git a/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-arrow/options.json b/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-arrow/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-arrow/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-rest/actual.js b/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-rest/actual.js
new file mode 100644
index 0000000000..df151fb1b2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-rest/actual.js
@@ -0,0 +1 @@
+((a),...b) => 0;
diff --git a/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-rest/options.json b/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-rest/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-rest/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/expected.json b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/expected.json
new file mode 100644
index 0000000000..10130f3578
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/expected.json
@@ -0,0 +1,32 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "sourceType": "script",
+ "body": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-member-expr.failure.json b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-member-expr.failure.json
new file mode 100755
index 0000000000..8245542d3d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-member-expr.failure.json
@@ -0,0 +1 @@
+{"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-member-expr.js b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-member-expr.js
new file mode 100755
index 0000000000..a5f4a07955
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-member-expr.js
@@ -0,0 +1 @@
+({a:b[0]})=>0
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-method-in-pattern.failure.json b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-method-in-pattern.failure.json
new file mode 100755
index 0000000000..030f8f3752
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-method-in-pattern.failure.json
@@ -0,0 +1 @@
+{"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-method-in-pattern.js b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-method-in-pattern.js
new file mode 100755
index 0000000000..79ff928dce
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-method-in-pattern.js
@@ -0,0 +1 @@
+({get a(){}}) => 0;
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-nested-param.failure.json b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-nested-param.failure.json
new file mode 100755
index 0000000000..08ba5aca74
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-nested-param.failure.json
@@ -0,0 +1 @@
+{"index":50,"lineNumber":1,"column":51,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-nested-param.js b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-nested-param.js
new file mode 100755
index 0000000000..a0f03b9660
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-nested-param.js
@@ -0,0 +1 @@
+([[[[[[[[[[[[[[[[[[[[{a:b[0]}]]]]]]]]]]]]]]]]]]]])=>0;
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-pattern-without-parenthesis.failure.json b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-pattern-without-parenthesis.failure.json
new file mode 100755
index 0000000000..b0c1b45f77
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-pattern-without-parenthesis.failure.json
@@ -0,0 +1 @@
+{"index":3,"lineNumber":1,"column":4,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-pattern-without-parenthesis.js b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-pattern-without-parenthesis.js
new file mode 100755
index 0000000000..76fa79dbcd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-pattern-without-parenthesis.js
@@ -0,0 +1 @@
+({}=>0)
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-rest-in-object-pattern.failure.json b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-rest-in-object-pattern.failure.json
new file mode 100755
index 0000000000..6551a47579
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-rest-in-object-pattern.failure.json
@@ -0,0 +1 @@
+{"index":4,"lineNumber":1,"column":5,"message":"Error: Line 1: Unexpected token ...","description":"Unexpected token ..."}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-rest-in-object-pattern.js b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-rest-in-object-pattern.js
new file mode 100755
index 0000000000..77352f8f88
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-rest-in-object-pattern.js
@@ -0,0 +1 @@
+({a,...b}) => 0;
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/nested-cover-grammar.js b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/nested-cover-grammar.js
new file mode 100755
index 0000000000..3481b6ca91
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/nested-cover-grammar.js
@@ -0,0 +1 @@
+([[[[[[[[[[[[[[[[[[[[{a=b}]]]]]]]]]]]]]]]]]]]])=>0;
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/object-binding-pattern-01.js b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/object-binding-pattern-01.js
new file mode 100755
index 0000000000..c50a2a757b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/object-binding-pattern-01.js
@@ -0,0 +1 @@
+({a,b=b,a:c,[a]:[d]})=>0;
diff --git a/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/object-binding-pattern-empty.js b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/object-binding-pattern-empty.js
new file mode 100755
index 0000000000..acfe22488e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/object-binding-pattern-empty.js
@@ -0,0 +1 @@
+({})=>0;
diff --git a/test/fixtures/esprima/es2015-arrow-function/param-with-rest-without-arrow/actual.js b/test/fixtures/esprima/es2015-arrow-function/param-with-rest-without-arrow/actual.js
new file mode 100644
index 0000000000..65116d42d4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/param-with-rest-without-arrow/actual.js
@@ -0,0 +1 @@
+(b, ...a) + 1
diff --git a/test/fixtures/esprima/es2015-arrow-function/param-with-rest-without-arrow/options.json b/test/fixtures/esprima/es2015-arrow-function/param-with-rest-without-arrow/options.json
new file mode 100644
index 0000000000..9f7910a413
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/param-with-rest-without-arrow/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-arrow-function/rest-without-arrow/actual.js b/test/fixtures/esprima/es2015-arrow-function/rest-without-arrow/actual.js
new file mode 100644
index 0000000000..13d242d02f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/rest-without-arrow/actual.js
@@ -0,0 +1 @@
+(...a) + 1
diff --git a/test/fixtures/esprima/es2015-arrow-function/rest-without-arrow/options.json b/test/fixtures/esprima/es2015-arrow-function/rest-without-arrow/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/es2015-arrow-function/rest-without-arrow/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/actual.js b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/actual.js
new file mode 100644
index 0000000000..315efbae83
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/actual.js
@@ -0,0 +1 @@
+0b0
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json
new file mode 100644
index 0000000000..8e5a64d7e3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0b0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/actual.js b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/actual.js
new file mode 100644
index 0000000000..d24eb0100a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/actual.js
@@ -0,0 +1 @@
+0b1
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json
new file mode 100644
index 0000000000..869a4573f6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "0b1"
+ },
+ "value": 1
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/actual.js b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/actual.js
new file mode 100644
index 0000000000..34eafb9e6d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/actual.js
@@ -0,0 +1 @@
+0b10
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json
new file mode 100644
index 0000000000..946f9be4db
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "extra": {
+ "rawValue": 2,
+ "raw": "0b10"
+ },
+ "value": 2
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/actual.js b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/actual.js
new file mode 100644
index 0000000000..1afe400c83
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/actual.js
@@ -0,0 +1 @@
+0B0
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json
new file mode 100644
index 0000000000..50c71c2d94
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0B0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/actual.js b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/actual.js
new file mode 100644
index 0000000000..f75498de50
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/actual.js
@@ -0,0 +1 @@
+0B1
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json
new file mode 100644
index 0000000000..94253b3ff7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "0B1"
+ },
+ "value": 1
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/actual.js b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/actual.js
new file mode 100644
index 0000000000..3847e5c0d8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/actual.js
@@ -0,0 +1 @@
+0B10
diff --git a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json
new file mode 100644
index 0000000000..5a539443cf
--- /dev/null
+++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "extra": {
+ "rawValue": 2,
+ "raw": "0B10"
+ },
+ "value": 2
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/.migrated_0026/actual.js b/test/fixtures/esprima/es2015-class/.migrated_0026/actual.js
new file mode 100644
index 0000000000..ecb24de6d9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/.migrated_0026/actual.js
@@ -0,0 +1 @@
+class A {a(eval){}}
diff --git a/test/fixtures/esprima/es2015-class/.migrated_0026/expected.json b/test/fixtures/esprima/es2015-class/.migrated_0026/expected.json
new file mode 100644
index 0000000000..c69f6a312a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/.migrated_0026/expected.json
@@ -0,0 +1,168 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "static": false,
+ "kind": "method",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 10,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0000/actual.js b/test/fixtures/esprima/es2015-class/migrated_0000/actual.js
new file mode 100644
index 0000000000..a869c28495
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0000/actual.js
@@ -0,0 +1 @@
+class A {}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0000/expected.json b/test/fixtures/esprima/es2015-class/migrated_0000/expected.json
new file mode 100644
index 0000000000..9be73d0dda
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0000/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0001/actual.js b/test/fixtures/esprima/es2015-class/migrated_0001/actual.js
new file mode 100644
index 0000000000..b8a3671ec0
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0001/actual.js
@@ -0,0 +1 @@
+class A extends 0 {}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0001/expected.json b/test/fixtures/esprima/es2015-class/migrated_0001/expected.json
new file mode 100644
index 0000000000..de6307983c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0001/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": {
+ "type": "NumberLiteral",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "body": {
+ "type": "ClassBody",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0002/actual.js b/test/fixtures/esprima/es2015-class/migrated_0002/actual.js
new file mode 100644
index 0000000000..38a97a0b1c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0002/actual.js
@@ -0,0 +1 @@
+class A {;}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0002/expected.json b/test/fixtures/esprima/es2015-class/migrated_0002/expected.json
new file mode 100644
index 0000000000..13ae4c94f1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0002/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0003/actual.js b/test/fixtures/esprima/es2015-class/migrated_0003/actual.js
new file mode 100644
index 0000000000..3528a381c3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0003/actual.js
@@ -0,0 +1 @@
+class A {;;}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0003/expected.json b/test/fixtures/esprima/es2015-class/migrated_0003/expected.json
new file mode 100644
index 0000000000..dbd2563e9f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0003/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0004/actual.js b/test/fixtures/esprima/es2015-class/migrated_0004/actual.js
new file mode 100644
index 0000000000..6c12735490
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0004/actual.js
@@ -0,0 +1 @@
+class A {a(){}}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0004/expected.json b/test/fixtures/esprima/es2015-class/migrated_0004/expected.json
new file mode 100644
index 0000000000..3e510efdc1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0004/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 12,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0005/actual.js b/test/fixtures/esprima/es2015-class/migrated_0005/actual.js
new file mode 100644
index 0000000000..225d0cc10d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0005/actual.js
@@ -0,0 +1 @@
+class A {a(){}b(){}}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0005/expected.json b/test/fixtures/esprima/es2015-class/migrated_0005/expected.json
new file mode 100644
index 0000000000..1ec03c3f48
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0005/expected.json
@@ -0,0 +1,193 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 12,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ClassMethod",
+ "start": 14,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "b"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0006/actual.js b/test/fixtures/esprima/es2015-class/migrated_0006/actual.js
new file mode 100644
index 0000000000..c71d0c48b4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0006/actual.js
@@ -0,0 +1 @@
+class A {a(){};b(){}}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0006/expected.json b/test/fixtures/esprima/es2015-class/migrated_0006/expected.json
new file mode 100644
index 0000000000..c883c50114
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0006/expected.json
@@ -0,0 +1,193 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 12,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ClassMethod",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "b"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0007/actual.js b/test/fixtures/esprima/es2015-class/migrated_0007/actual.js
new file mode 100644
index 0000000000..28359eb659
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0007/actual.js
@@ -0,0 +1 @@
+class A {a(){};b(){};}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0007/expected.json b/test/fixtures/esprima/es2015-class/migrated_0007/expected.json
new file mode 100644
index 0000000000..57df44f925
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0007/expected.json
@@ -0,0 +1,193 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 12,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ClassMethod",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "b"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0008/actual.js b/test/fixtures/esprima/es2015-class/migrated_0008/actual.js
new file mode 100644
index 0000000000..21c95927e5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0008/actual.js
@@ -0,0 +1 @@
+class A {;a(){};b(){};}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0008/expected.json b/test/fixtures/esprima/es2015-class/migrated_0008/expected.json
new file mode 100644
index 0000000000..129657a7fc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0008/expected.json
@@ -0,0 +1,193 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 10,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "a"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ClassMethod",
+ "start": 16,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "b"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0009/actual.js b/test/fixtures/esprima/es2015-class/migrated_0009/actual.js
new file mode 100644
index 0000000000..37ee444b36
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0009/actual.js
@@ -0,0 +1 @@
+class A {static(){};}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0009/expected.json b/test/fixtures/esprima/es2015-class/migrated_0009/expected.json
new file mode 100644
index 0000000000..aa0a5f9344
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0009/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "static"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0010/actual.js b/test/fixtures/esprima/es2015-class/migrated_0010/actual.js
new file mode 100644
index 0000000000..3522e47d56
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0010/actual.js
@@ -0,0 +1 @@
+class A {get a(){} set b(c){};}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0010/expected.json b/test/fixtures/esprima/es2015-class/migrated_0010/expected.json
new file mode 100644
index 0000000000..92e8ef8e43
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0010/expected.json
@@ -0,0 +1,210 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "a"
+ },
+ "static": false,
+ "kind": "get",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ClassMethod",
+ "start": 19,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "b"
+ },
+ "static": false,
+ "kind": "set",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "name": "c"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0011/actual.js b/test/fixtures/esprima/es2015-class/migrated_0011/actual.js
new file mode 100644
index 0000000000..d51a855c19
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0011/actual.js
@@ -0,0 +1 @@
+class A {static a(){} static get a(){} static set a(b){} }
diff --git a/test/fixtures/esprima/es2015-class/migrated_0011/expected.json b/test/fixtures/esprima/es2015-class/migrated_0011/expected.json
new file mode 100644
index 0000000000..c6498e9b27
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0011/expected.json
@@ -0,0 +1,265 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "a"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ClassMethod",
+ "start": 22,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "name": "a"
+ },
+ "static": true,
+ "kind": "get",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 36,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ClassMethod",
+ "start": 39,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 50,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 50
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "name": "a"
+ },
+ "static": true,
+ "kind": "set",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 52,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 52
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "name": "b"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 54,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 54
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0012/actual.js b/test/fixtures/esprima/es2015-class/migrated_0012/actual.js
new file mode 100644
index 0000000000..9e05866140
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0012/actual.js
@@ -0,0 +1 @@
+class A {static a(){};}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0012/expected.json b/test/fixtures/esprima/es2015-class/migrated_0012/expected.json
new file mode 100644
index 0000000000..fa54d94267
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0012/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "a"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0013/actual.js b/test/fixtures/esprima/es2015-class/migrated_0013/actual.js
new file mode 100644
index 0000000000..3655b96640
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0013/actual.js
@@ -0,0 +1 @@
+class A {static [a](){};}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0013/expected.json b/test/fixtures/esprima/es2015-class/migrated_0013/expected.json
new file mode 100644
index 0000000000..c7ff2d5228
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0013/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "computed": true,
+ "key": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "a"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0014/actual.js b/test/fixtures/esprima/es2015-class/migrated_0014/actual.js
new file mode 100644
index 0000000000..d7d015564b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0014/actual.js
@@ -0,0 +1 @@
+class A {static[a](){}; static[b](){}}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0014/expected.json b/test/fixtures/esprima/es2015-class/migrated_0014/expected.json
new file mode 100644
index 0000000000..3a78f1bd7d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0014/expected.json
@@ -0,0 +1,193 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "computed": true,
+ "key": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "a"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ClassMethod",
+ "start": 24,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "computed": true,
+ "key": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "name": "b"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 35,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0015/actual.js b/test/fixtures/esprima/es2015-class/migrated_0015/actual.js
new file mode 100644
index 0000000000..ef28cd29d4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0015/actual.js
@@ -0,0 +1 @@
+class A {static static(){};}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0015/expected.json b/test/fixtures/esprima/es2015-class/migrated_0015/expected.json
new file mode 100644
index 0000000000..ade3ae124b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0015/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "static"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 24,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0016/actual.js b/test/fixtures/esprima/es2015-class/migrated_0016/actual.js
new file mode 100644
index 0000000000..9e20af5ce5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0016/actual.js
@@ -0,0 +1 @@
+var x = class A extends 0{}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0016/expected.json b/test/fixtures/esprima/es2015-class/migrated_0016/expected.json
new file mode 100644
index 0000000000..0ba4da86df
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0016/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "ClassExpression",
+ "start": 8,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "A"
+ },
+ "superClass": {
+ "type": "NumberLiteral",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "body": {
+ "type": "ClassBody",
+ "start": 25,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0017/actual.js b/test/fixtures/esprima/es2015-class/migrated_0017/actual.js
new file mode 100644
index 0000000000..f99ff2f6ae
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0017/actual.js
@@ -0,0 +1 @@
+class A {prototype(){}}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0017/expected.json b/test/fixtures/esprima/es2015-class/migrated_0017/expected.json
new file mode 100644
index 0000000000..2a2d1f81f9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0017/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "prototype"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0018/actual.js b/test/fixtures/esprima/es2015-class/migrated_0018/actual.js
new file mode 100644
index 0000000000..22b21f85a8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0018/actual.js
@@ -0,0 +1 @@
+class A {constructor(){}}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0018/expected.json b/test/fixtures/esprima/es2015-class/migrated_0018/expected.json
new file mode 100644
index 0000000000..8a0d50c2c6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0018/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "constructor"
+ },
+ "static": false,
+ "kind": "constructor",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 22,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0019/actual.js b/test/fixtures/esprima/es2015-class/migrated_0019/actual.js
new file mode 100644
index 0000000000..4055effa37
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0019/actual.js
@@ -0,0 +1 @@
+class A {"constructor"(){} ["constructor"](){}}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0019/expected.json b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json
new file mode 100644
index 0000000000..72bb521716
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json
@@ -0,0 +1,201 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 9,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "extra": {
+ "rawValue": "constructor",
+ "raw": "\"constructor\""
+ },
+ "value": "constructor"
+ },
+ "static": false,
+ "kind": "constructor",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 24,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ClassMethod",
+ "start": 27,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "computed": true,
+ "key": {
+ "type": "StringLiteral",
+ "start": 28,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "extra": {
+ "rawValue": "constructor",
+ "raw": "\"constructor\""
+ },
+ "value": "constructor"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 44,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 44
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0020/actual.js b/test/fixtures/esprima/es2015-class/migrated_0020/actual.js
new file mode 100644
index 0000000000..2a91706210
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0020/actual.js
@@ -0,0 +1 @@
+class A {static constructor(){} static constructor(){}}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0020/expected.json b/test/fixtures/esprima/es2015-class/migrated_0020/expected.json
new file mode 100644
index 0000000000..8ee060397d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0020/expected.json
@@ -0,0 +1,193 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "constructor"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 29,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ClassMethod",
+ "start": 32,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 39,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "name": "constructor"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 52,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 52
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0021/actual.js b/test/fixtures/esprima/es2015-class/migrated_0021/actual.js
new file mode 100644
index 0000000000..f67a12b369
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0021/actual.js
@@ -0,0 +1 @@
+class A {static ["prototype"](){}}
diff --git a/test/fixtures/esprima/es2015-class/migrated_0021/expected.json b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json
new file mode 100644
index 0000000000..05b3f0a4ac
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json
@@ -0,0 +1,142 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "computed": true,
+ "key": {
+ "type": "StringLiteral",
+ "start": 17,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "extra": {
+ "rawValue": "prototype",
+ "raw": "\"prototype\""
+ },
+ "value": "prototype"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 31,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0022/actual.js b/test/fixtures/esprima/es2015-class/migrated_0022/actual.js
new file mode 100644
index 0000000000..cfc53f66a8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0022/actual.js
@@ -0,0 +1 @@
+(class {})
diff --git a/test/fixtures/esprima/es2015-class/migrated_0022/expected.json b/test/fixtures/esprima/es2015-class/migrated_0022/expected.json
new file mode 100644
index 0000000000..0df98d2cb5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0022/expected.json
@@ -0,0 +1,85 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "expression": {
+ "type": "ClassExpression",
+ "start": 1,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "id": null,
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 7,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "body": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0023/actual.js b/test/fixtures/esprima/es2015-class/migrated_0023/actual.js
new file mode 100644
index 0000000000..156703052c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0023/actual.js
@@ -0,0 +1 @@
+(class A {})
diff --git a/test/fixtures/esprima/es2015-class/migrated_0023/expected.json b/test/fixtures/esprima/es2015-class/migrated_0023/expected.json
new file mode 100644
index 0000000000..f639d9d497
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0023/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "ClassExpression",
+ "start": 1,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "body": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0024/actual.js b/test/fixtures/esprima/es2015-class/migrated_0024/actual.js
new file mode 100644
index 0000000000..d4d239c25b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0024/actual.js
@@ -0,0 +1 @@
+(class extends 0{})
diff --git a/test/fixtures/esprima/es2015-class/migrated_0024/expected.json b/test/fixtures/esprima/es2015-class/migrated_0024/expected.json
new file mode 100644
index 0000000000..e85fb517b8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0024/expected.json
@@ -0,0 +1,104 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "expression": {
+ "type": "ClassExpression",
+ "start": 1,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": null,
+ "superClass": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "body": {
+ "type": "ClassBody",
+ "start": 16,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "body": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-class/migrated_0025/actual.js b/test/fixtures/esprima/es2015-class/migrated_0025/actual.js
new file mode 100644
index 0000000000..3aad971839
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0025/actual.js
@@ -0,0 +1 @@
+(class A extends 0{})
diff --git a/test/fixtures/esprima/es2015-class/migrated_0025/expected.json b/test/fixtures/esprima/es2015-class/migrated_0025/expected.json
new file mode 100644
index 0000000000..cf178864e7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-class/migrated_0025/expected.json
@@ -0,0 +1,119 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "expression": {
+ "type": "ClassExpression",
+ "start": 1,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "A"
+ },
+ "superClass": {
+ "type": "NumberLiteral",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "body": {
+ "type": "ClassBody",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/actual.js b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/actual.js
new file mode 100644
index 0000000000..8031dd7db9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/actual.js
@@ -0,0 +1 @@
+x = function(y = 1) {}
diff --git a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json
new file mode 100644
index 0000000000..3799c4ee35
--- /dev/null
+++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "FunctionExpression",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 13,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "y"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/actual.js b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/actual.js
new file mode 100644
index 0000000000..25e4a13a7a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/actual.js
@@ -0,0 +1 @@
+function f(a = 1) {}
diff --git a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json
new file mode 100644
index 0000000000..b922dc9f54
--- /dev/null
+++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json
@@ -0,0 +1,137 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 11,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/actual.js b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/actual.js
new file mode 100644
index 0000000000..e6afbda892
--- /dev/null
+++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/actual.js
@@ -0,0 +1 @@
+x = { f: function(a=1) {} }
diff --git a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json
new file mode 100644
index 0000000000..64c3b49fae
--- /dev/null
+++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json
@@ -0,0 +1,220 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 4,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 6,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "f"
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "start": 9,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 18,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/actual.js
new file mode 100644
index 0000000000..32ca5172db
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/actual.js
@@ -0,0 +1 @@
+[a,a,,...a]=0;
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json
new file mode 100644
index 0000000000..6079a74348
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json
@@ -0,0 +1,166 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ArrayPattern",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 3,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "a"
+ },
+ null,
+ {
+ "type": "RestElement",
+ "start": 6,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/actual.js
new file mode 100644
index 0000000000..1819baf74d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/actual.js
@@ -0,0 +1 @@
+[,,]=0
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json
new file mode 100644
index 0000000000..b4dad85bbf
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json
@@ -0,0 +1,104 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ArrayPattern",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "elements": [
+ null,
+ null
+ ]
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/actual.js
new file mode 100644
index 0000000000..f09a194748
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/actual.js
@@ -0,0 +1 @@
+[...a[0]] = 0;
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json
new file mode 100644
index 0000000000..95e743cb0f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ArrayPattern",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "elements": [
+ {
+ "type": "RestElement",
+ "start": 1,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "argument": {
+ "type": "MemberExpression",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "a"
+ },
+ "property": {
+ "type": "NumberLiteral",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "computed": true
+ }
+ }
+ ]
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/actual.js
new file mode 100644
index 0000000000..4bb7333964
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/actual.js
@@ -0,0 +1 @@
+[a,b=0,[c,...a[0]]={}]=0;
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json
new file mode 100644
index 0000000000..a3b62d0ec1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json
@@ -0,0 +1,300 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ArrayPattern",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "AssignmentPattern",
+ "start": 3,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "b"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ },
+ {
+ "type": "AssignmentPattern",
+ "start": 7,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "left": {
+ "type": "ArrayPattern",
+ "start": 7,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "c"
+ },
+ {
+ "type": "RestElement",
+ "start": 10,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "argument": {
+ "type": "MemberExpression",
+ "start": 13,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "a"
+ },
+ "property": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "computed": true
+ }
+ }
+ ]
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 19,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "properties": []
+ }
+ }
+ ]
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/actual.js
new file mode 100644
index 0000000000..4b9a5e317b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/actual.js
@@ -0,0 +1 @@
+[{a=b}=0]
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json
new file mode 100644
index 0000000000..9c12c4fa9c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json
@@ -0,0 +1,200 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "ArrayExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "elements": [
+ {
+ "type": "AssignmentExpression",
+ "start": 1,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ObjectPattern",
+ "start": 1,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 2,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "AssignmentPattern",
+ "start": 2,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "b"
+ }
+ }
+ }
+ ]
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/actual.js
new file mode 100644
index 0000000000..7cfd69bb5f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/actual.js
@@ -0,0 +1 @@
+[a] = 0;
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json
new file mode 100644
index 0000000000..5d3cc3bc51
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json
@@ -0,0 +1,118 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ArrayPattern",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "a"
+ }
+ ]
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/actual.js
new file mode 100644
index 0000000000..90c7f79b8c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/actual.js
@@ -0,0 +1 @@
+({} = 0);
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json
new file mode 100644
index 0000000000..0b11316d47
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json
@@ -0,0 +1,104 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 1,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ObjectPattern",
+ "start": 1,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "properties": []
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-01/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-01/actual.js
new file mode 100644
index 0000000000..e4587fbdf2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-01/actual.js
@@ -0,0 +1 @@
+({a:this}=0)
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-01/options.json b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-01/options.json
new file mode 100644
index 0000000000..f940813b9f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-01/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-02/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-02/actual.js
new file mode 100644
index 0000000000..d6169342ed
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-02/actual.js
@@ -0,0 +1 @@
+({a: this} = 0);
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-02/options.json b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-02/options.json
new file mode 100644
index 0000000000..85f6f01102
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-02/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-pattern-with-method/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-pattern-with-method/actual.js
new file mode 100644
index 0000000000..4dc400f18b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-pattern-with-method/actual.js
@@ -0,0 +1 @@
+({get a(){}})=0
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-pattern-with-method/options.json b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-pattern-with-method/options.json
new file mode 100644
index 0000000000..359d73aba0
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-pattern-with-method/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Object pattern can't contain getter or setter (1:6)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/actual.js
new file mode 100644
index 0000000000..eafafc8751
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/actual.js
@@ -0,0 +1 @@
+[[[[[[[[[[[[[[[[[[[[{a=b[0]}]]]]]]]]]]]]]]]]]]]]=0;
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json
new file mode 100644
index 0000000000..559a8db8fc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json
@@ -0,0 +1,559 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ArrayPattern",
+ "start": 0,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 1,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 2,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 3,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 4,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 5,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 6,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 7,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 8,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 9,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 10,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 11,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 12,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 13,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 14,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 15,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 16,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 17,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "elements": [
+ {
+ "type": "ArrayPattern",
+ "start": 19,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "elements": [
+ {
+ "type": "ObjectPattern",
+ "start": 20,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 21,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "AssignmentPattern",
+ "start": 21,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "MemberExpression",
+ "start": 23,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "b"
+ },
+ "property": {
+ "type": "NumberLiteral",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "computed": true
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 49,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/actual.js
new file mode 100644
index 0000000000..c24458998d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/actual.js
@@ -0,0 +1,8 @@
+({
+ a,
+ a:a,
+ a:a=a,
+ [a]:{a},
+ a:some_call()[a],
+ a:this.a
+} = 0);
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json
new file mode 100644
index 0000000000..aab8a1a69e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json
@@ -0,0 +1,566 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 85,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 85,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 85,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 1,
+ "end": 83,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 8,
+ "column": 5
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ObjectPattern",
+ "start": 1,
+ "end": 79,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 8,
+ "column": 1
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "name": "a"
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 14,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 5
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "name": "a"
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 23,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "AssignmentPattern",
+ "start": 25,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 7
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 8
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "name": "a"
+ }
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 34,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 4
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": true,
+ "key": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 5
+ },
+ "end": {
+ "line": 5,
+ "column": 6
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "ObjectPattern",
+ "start": 38,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 39,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 39,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 39,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 47,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 4
+ },
+ "end": {
+ "line": 6,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 4
+ },
+ "end": {
+ "line": 6,
+ "column": 5
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "MemberExpression",
+ "start": 49,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 20
+ }
+ },
+ "object": {
+ "type": "CallExpression",
+ "start": 49,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 17
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 49,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 15
+ }
+ },
+ "name": "some_call"
+ },
+ "arguments": []
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 61,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 18
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ },
+ "name": "a"
+ },
+ "computed": true
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 69,
+ "end": 77,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 69,
+ "end": 70,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 5
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "MemberExpression",
+ "start": 71,
+ "end": 77,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 6
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "object": {
+ "type": "ThisExpression",
+ "start": 71,
+ "end": 75,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 6
+ },
+ "end": {
+ "line": 7,
+ "column": 10
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 76,
+ "end": 77,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 11
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "name": "a"
+ },
+ "computed": false
+ }
+ }
+ ]
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 82,
+ "end": 83,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 4
+ },
+ "end": {
+ "line": 8,
+ "column": 5
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment/invalid-cover-grammar/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment/invalid-cover-grammar/actual.js
new file mode 100644
index 0000000000..0b41490405
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment/invalid-cover-grammar/actual.js
@@ -0,0 +1 @@
+[[[[[[[[[[[[[[[[[[[[{a=b}]]]]]]]]]]]]]]]]]]]]
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment/invalid-cover-grammar/options.json b/test/fixtures/esprima/es2015-destructuring-assignment/invalid-cover-grammar/options.json
new file mode 100644
index 0000000000..b23f881870
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment/invalid-cover-grammar/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:22)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment/invalid-group-assignment/actual.js b/test/fixtures/esprima/es2015-destructuring-assignment/invalid-group-assignment/actual.js
new file mode 100644
index 0000000000..edb5ea6143
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment/invalid-group-assignment/actual.js
@@ -0,0 +1 @@
+(a,b)=(c,d);
diff --git a/test/fixtures/esprima/es2015-destructuring-assignment/invalid-group-assignment/options.json b/test/fixtures/esprima/es2015-destructuring-assignment/invalid-group-assignment/options.json
new file mode 100644
index 0000000000..4d699b8b0c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-destructuring-assignment/invalid-group-assignment/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-const-number/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-const-number/actual.js
new file mode 100644
index 0000000000..bb1843d113
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-const-number/actual.js
@@ -0,0 +1 @@
+export const foo = 1;
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json
new file mode 100644
index 0000000000..4449de5650
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "specifiers": [],
+ "source": null,
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 7,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 13,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "foo"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
+ }
+ ],
+ "kind": "const"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-array/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-default-array/actual.js
new file mode 100644
index 0000000000..d6d1738de6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-array/actual.js
@@ -0,0 +1 @@
+export default [];
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-array/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-array/expected.json
new file mode 100644
index 0000000000..50cc489ebb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-array/expected.json
@@ -0,0 +1,64 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "declaration": {
+ "type": "ArrayExpression",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "elements": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-class/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-default-class/actual.js
new file mode 100644
index 0000000000..a6e68e9838
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-class/actual.js
@@ -0,0 +1 @@
+export default class {}
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json
new file mode 100644
index 0000000000..c6453bfd9c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json
@@ -0,0 +1,82 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declaration": {
+ "type": "ClassDeclaration",
+ "start": 15,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": null,
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 21,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-expression/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-default-expression/actual.js
new file mode 100644
index 0000000000..f30c184a1a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-expression/actual.js
@@ -0,0 +1 @@
+export default (1 + 2);
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json
new file mode 100644
index 0000000000..e881a423f0
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json
@@ -0,0 +1,108 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declaration": {
+ "type": "BinaryExpression",
+ "start": 16,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "left": {
+ "type": "NumberLiteral",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ },
+ "operator": "+",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-function/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-default-function/actual.js
new file mode 100644
index 0000000000..ea9b101e1c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-function/actual.js
@@ -0,0 +1 @@
+export default function () {}
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json
new file mode 100644
index 0000000000..364e85431c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json
@@ -0,0 +1,85 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "declaration": {
+ "type": "FunctionDeclaration",
+ "start": 15,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-named-function/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-default-named-function/actual.js
new file mode 100644
index 0000000000..386baca173
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-named-function/actual.js
@@ -0,0 +1 @@
+export default function foo() {}
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-named-function/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-named-function/expected.json
new file mode 100644
index 0000000000..904f0ed8d9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-named-function/expected.json
@@ -0,0 +1,98 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "declaration": {
+ "type": "FunctionDeclaration",
+ "start": 15,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "foo"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 30,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-number/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-default-number/actual.js
new file mode 100644
index 0000000000..7a4e8a723a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-number/actual.js
@@ -0,0 +1 @@
+export default 42;
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json
new file mode 100644
index 0000000000..4758b655ec
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "declaration": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-object/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-default-object/actual.js
new file mode 100644
index 0000000000..f8266ca25f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-object/actual.js
@@ -0,0 +1 @@
+export default { foo: 1 };
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json
new file mode 100644
index 0000000000..ae7eefb6d2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "declaration": {
+ "type": "ObjectExpression",
+ "start": 15,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 17,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "foo"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 22,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-value/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-default-value/actual.js
new file mode 100644
index 0000000000..f7b318b3f6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-value/actual.js
@@ -0,0 +1 @@
+export default foo;
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-default-value/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-value/expected.json
new file mode 100644
index 0000000000..7425436e1f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-default-value/expected.json
@@ -0,0 +1,64 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "declaration": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-batch/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-from-batch/actual.js
new file mode 100644
index 0000000000..9ec8f63ab2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-batch/actual.js
@@ -0,0 +1 @@
+export * from "foo";
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json
new file mode 100644
index 0000000000..e3e870a7bf
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportAllDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "source": {
+ "type": "StringLiteral",
+ "start": 14,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-default/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-from-default/actual.js
new file mode 100644
index 0000000000..2c7930d925
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-default/actual.js
@@ -0,0 +1 @@
+export {default} from "foo";
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json
new file mode 100644
index 0000000000..0a6a723e7b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json
@@ -0,0 +1,119 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "default"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "default"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 22,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/actual.js
new file mode 100644
index 0000000000..5be9a685aa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/actual.js
@@ -0,0 +1 @@
+export {foo as default} from "foo";
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json
new file mode 100644
index 0000000000..466e385f0b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json
@@ -0,0 +1,119 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "default"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 29,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/actual.js
new file mode 100644
index 0000000000..9fff903bd9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/actual.js
@@ -0,0 +1 @@
+export {foo as bar} from "foo";
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json
new file mode 100644
index 0000000000..7ae9c17b81
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json
@@ -0,0 +1,119 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "bar"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 25,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/actual.js
new file mode 100644
index 0000000000..4461d79e3b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/actual.js
@@ -0,0 +1 @@
+export {foo as default, bar} from "foo";
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json
new file mode 100644
index 0000000000..65c0fa29ea
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json
@@ -0,0 +1,166 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "default"
+ }
+ },
+ {
+ "type": "ExportSpecifier",
+ "start": 24,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "bar"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "bar"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 34,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/actual.js
new file mode 100644
index 0000000000..83b7b67c51
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/actual.js
@@ -0,0 +1 @@
+export {foo} from "foo";
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json
new file mode 100644
index 0000000000..396665ef21
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json
@@ -0,0 +1,119 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 18,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/actual.js
new file mode 100644
index 0000000000..35c2762a29
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/actual.js
@@ -0,0 +1 @@
+export {foo, bar} from "foo";
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json
new file mode 100644
index 0000000000..09fc23f85e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json
@@ -0,0 +1,166 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ }
+ },
+ {
+ "type": "ExportSpecifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "bar"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "bar"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 23,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/actual.js
new file mode 100644
index 0000000000..003d71f6ae
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/actual.js
@@ -0,0 +1 @@
+export function foo () {} false
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json
new file mode 100644
index 0000000000..d9b4d3f5a5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json
@@ -0,0 +1,133 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "specifiers": [],
+ "source": null,
+ "declaration": {
+ "type": "FunctionDeclaration",
+ "start": 7,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "foo"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "BooleanLiteral",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": false
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-function/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-function/actual.js
new file mode 100644
index 0000000000..768586d72c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-function/actual.js
@@ -0,0 +1 @@
+export function foo () {}
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-function/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-function/expected.json
new file mode 100644
index 0000000000..88b3e7b5b3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-function/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "specifiers": [],
+ "source": null,
+ "declaration": {
+ "type": "FunctionDeclaration",
+ "start": 7,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "foo"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-let-number/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-let-number/actual.js
new file mode 100644
index 0000000000..9d2b01ce65
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-let-number/actual.js
@@ -0,0 +1 @@
+export let foo = 1;
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json
new file mode 100644
index 0000000000..b4302c2d1b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "specifiers": [],
+ "source": null,
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 7,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 11,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "foo"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/actual.js
new file mode 100644
index 0000000000..5d32a24de0
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/actual.js
@@ -0,0 +1 @@
+export {foo as default};
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/expected.json
new file mode 100644
index 0000000000..9c84a45187
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/expected.json
@@ -0,0 +1,99 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "default"
+ }
+ }
+ ],
+ "source": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/actual.js
new file mode 100644
index 0000000000..e7820a6f02
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/actual.js
@@ -0,0 +1 @@
+export {foo as bar};
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/expected.json
new file mode 100644
index 0000000000..0b4b274d42
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/expected.json
@@ -0,0 +1,99 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "bar"
+ }
+ }
+ ],
+ "source": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/actual.js
new file mode 100644
index 0000000000..ff57927839
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/actual.js
@@ -0,0 +1 @@
+export {foo as default, bar};
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/expected.json
new file mode 100644
index 0000000000..35d224c0d9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/expected.json
@@ -0,0 +1,146 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "default"
+ }
+ },
+ {
+ "type": "ExportSpecifier",
+ "start": 24,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "bar"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "bar"
+ }
+ }
+ ],
+ "source": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-empty/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-named-empty/actual.js
new file mode 100644
index 0000000000..cb0ff5c3b5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-empty/actual.js
@@ -0,0 +1 @@
+export {};
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-empty/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-named-empty/expected.json
new file mode 100644
index 0000000000..7c7d2cfb8b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-empty/expected.json
@@ -0,0 +1,51 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "declaration": null,
+ "specifiers": [],
+ "source": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/actual.js
new file mode 100644
index 0000000000..df5f5e609e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/actual.js
@@ -0,0 +1 @@
+export {foo};
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/expected.json
new file mode 100644
index 0000000000..923c934a26
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/expected.json
@@ -0,0 +1,99 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ],
+ "source": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/actual.js
new file mode 100644
index 0000000000..61bc40fd77
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/actual.js
@@ -0,0 +1 @@
+export {foo, bar,};
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/expected.json
new file mode 100644
index 0000000000..0694002dce
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/expected.json
@@ -0,0 +1,146 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ }
+ },
+ {
+ "type": "ExportSpecifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "bar"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "bar"
+ }
+ }
+ ],
+ "source": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/actual.js
new file mode 100644
index 0000000000..fdbc942750
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/actual.js
@@ -0,0 +1 @@
+export {foo, bar};
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/expected.json
new file mode 100644
index 0000000000..745d2e9d0b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/expected.json
@@ -0,0 +1,146 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ }
+ },
+ {
+ "type": "ExportSpecifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "bar"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "bar"
+ }
+ }
+ ],
+ "source": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-var-anonymous-function/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-var-anonymous-function/actual.js
new file mode 100644
index 0000000000..f8af288212
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-var-anonymous-function/actual.js
@@ -0,0 +1 @@
+export var foo = function () {};
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-var-anonymous-function/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-var-anonymous-function/expected.json
new file mode 100644
index 0000000000..130b99c96e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-var-anonymous-function/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "specifiers": [],
+ "source": null,
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 7,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 11,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "foo"
+ },
+ "init": {
+ "type": "FunctionExpression",
+ "start": 17,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 29,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-var-number/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-var-number/actual.js
new file mode 100644
index 0000000000..e2e71aa4fc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-var-number/actual.js
@@ -0,0 +1 @@
+export var foo = 1;
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json
new file mode 100644
index 0000000000..bca842d905
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "specifiers": [],
+ "source": null,
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 7,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 11,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "foo"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-var/actual.js b/test/fixtures/esprima/es2015-export-declaration/export-var/actual.js
new file mode 100644
index 0000000000..62da3e6018
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-var/actual.js
@@ -0,0 +1 @@
+export var bar;
diff --git a/test/fixtures/esprima/es2015-export-declaration/export-var/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-var/expected.json
new file mode 100644
index 0000000000..22ba6ec97b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/export-var/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "specifiers": [],
+ "source": null,
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 7,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 11,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "bar"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-missing-from-clause/actual.js b/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-missing-from-clause/actual.js
new file mode 100644
index 0000000000..3f576881e6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-missing-from-clause/actual.js
@@ -0,0 +1 @@
+export *
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-missing-from-clause/options.json b/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-missing-from-clause/options.json
new file mode 100644
index 0000000000..65ef4a184a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-missing-from-clause/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:8)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-token/actual.js b/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-token/actual.js
new file mode 100644
index 0000000000..32cb28ea92
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-token/actual.js
@@ -0,0 +1 @@
+export * +
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-token/options.json b/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-token/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-token/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-equal/actual.js b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-equal/actual.js
new file mode 100644
index 0000000000..0dfb038eb5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-equal/actual.js
@@ -0,0 +1 @@
+export default = 42
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-equal/options.json b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-equal/options.json
new file mode 100644
index 0000000000..7ca1e1ffbb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-equal/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/actual.js b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/actual.js
new file mode 100644
index 0000000000..a0af03d2e6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/actual.js
@@ -0,0 +1 @@
+export {default} +
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/options.json b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/options.json
new file mode 100644
index 0000000000..8bb9a5f99b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:17)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/actual.js b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/actual.js
new file mode 100644
index 0000000000..8dfa0a19a9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/actual.js
@@ -0,0 +1 @@
+export default from "foo"
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json
new file mode 100644
index 0000000000..aca079ee39
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:20)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/actual.js b/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/actual.js
new file mode 100644
index 0000000000..8f3cde5c96
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/actual.js
@@ -0,0 +1 @@
+export {default}
diff --git a/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/options.json b/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/options.json
new file mode 100644
index 0000000000..4c07f39d17
--- /dev/null
+++ b/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:16)"
+}
diff --git a/test/fixtures/harmony/modules/export-default-function-declaration/options.json b/test/fixtures/esprima/es2015-export-declaration/options.json
similarity index 100%
rename from test/fixtures/harmony/modules/export-default-function-declaration/options.json
rename to test/fixtures/esprima/es2015-export-declaration/options.json
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-array-pattern-let/actual.js b/test/fixtures/esprima/es2015-for-of/for-of-array-pattern-let/actual.js
new file mode 100644
index 0000000000..a8c67fc5f7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-array-pattern-let/actual.js
@@ -0,0 +1 @@
+for (let [p, q] of r);
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-array-pattern-let/expected.json b/test/fixtures/esprima/es2015-for-of/for-of-array-pattern-let/expected.json
new file mode 100644
index 0000000000..f81b113841
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-array-pattern-let/expected.json
@@ -0,0 +1,162 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForOfStatement",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 9,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "id": {
+ "type": "ArrayPattern",
+ "start": 9,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "p"
+ },
+ {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "q"
+ }
+ ]
+ },
+ "init": null
+ }
+ ],
+ "kind": "let"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "r"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-array-pattern/actual.js b/test/fixtures/esprima/es2015-for-of/for-of-array-pattern/actual.js
new file mode 100644
index 0000000000..9d98abad0c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-array-pattern/actual.js
@@ -0,0 +1 @@
+for ([p, q] of r);
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-array-pattern/expected.json b/test/fixtures/esprima/es2015-for-of/for-of-array-pattern/expected.json
new file mode 100644
index 0000000000..c174207c6b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-array-pattern/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForOfStatement",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "left": {
+ "type": "ArrayPattern",
+ "start": 5,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "p"
+ },
+ {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "q"
+ }
+ ]
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "r"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-object-pattern-const/actual.js b/test/fixtures/esprima/es2015-for-of/for-of-object-pattern-const/actual.js
new file mode 100644
index 0000000000..05db80eefc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-object-pattern-const/actual.js
@@ -0,0 +1 @@
+for (const {x, y} of z);
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-object-pattern-const/expected.json b/test/fixtures/esprima/es2015-for-of/for-of-object-pattern-const/expected.json
new file mode 100644
index 0000000000..bf3b9e73b7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-object-pattern-const/expected.json
@@ -0,0 +1,231 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForOfStatement",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 11,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 11,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "x"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "x"
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "y"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "y"
+ }
+ }
+ ]
+ },
+ "init": null
+ }
+ ],
+ "kind": "const"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "z"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-object-pattern/actual.js b/test/fixtures/esprima/es2015-for-of/for-of-object-pattern/actual.js
new file mode 100644
index 0000000000..a96674542a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-object-pattern/actual.js
@@ -0,0 +1 @@
+for ({x, y} of z);
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-object-pattern/expected.json b/test/fixtures/esprima/es2015-for-of/for-of-object-pattern/expected.json
new file mode 100644
index 0000000000..025d0acd2b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-object-pattern/expected.json
@@ -0,0 +1,197 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForOfStatement",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "left": {
+ "type": "ObjectPattern",
+ "start": 5,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "y"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "y"
+ }
+ }
+ ]
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "z"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-with-const/actual.js b/test/fixtures/esprima/es2015-for-of/for-of-with-const/actual.js
new file mode 100644
index 0000000000..3cb53e5e6e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-with-const/actual.js
@@ -0,0 +1 @@
+for (const y of list);
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-with-const/expected.json b/test/fixtures/esprima/es2015-for-of/for-of-with-const/expected.json
new file mode 100644
index 0000000000..7608d6e366
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-with-const/expected.json
@@ -0,0 +1,129 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForOfStatement",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "y"
+ },
+ "init": null
+ }
+ ],
+ "kind": "const"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "list"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-with-let/actual.js b/test/fixtures/esprima/es2015-for-of/for-of-with-let/actual.js
new file mode 100644
index 0000000000..4596dd4be2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-with-let/actual.js
@@ -0,0 +1 @@
+for (let z of list);
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-with-let/expected.json b/test/fixtures/esprima/es2015-for-of/for-of-with-let/expected.json
new file mode 100644
index 0000000000..f48045b006
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-with-let/expected.json
@@ -0,0 +1,129 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForOfStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "z"
+ },
+ "init": null
+ }
+ ],
+ "kind": "let"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "list"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-with-var/actual.js b/test/fixtures/esprima/es2015-for-of/for-of-with-var/actual.js
new file mode 100644
index 0000000000..1bd32300f2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-with-var/actual.js
@@ -0,0 +1 @@
+for (var x of list);
diff --git a/test/fixtures/esprima/es2015-for-of/for-of-with-var/expected.json b/test/fixtures/esprima/es2015-for-of/for-of-with-var/expected.json
new file mode 100644
index 0000000000..75eaef11cf
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of-with-var/expected.json
@@ -0,0 +1,129 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForOfStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "x"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "list"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/for-of/actual.js b/test/fixtures/esprima/es2015-for-of/for-of/actual.js
new file mode 100644
index 0000000000..61d83114bd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of/actual.js
@@ -0,0 +1 @@
+for (p of q);
diff --git a/test/fixtures/esprima/es2015-for-of/for-of/expected.json b/test/fixtures/esprima/es2015-for-of/for-of/expected.json
new file mode 100644
index 0000000000..32de26d7ac
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/for-of/expected.json
@@ -0,0 +1,95 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForOfStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "p"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "q"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/invalid-const-init/actual.js b/test/fixtures/esprima/es2015-for-of/invalid-const-init/actual.js
new file mode 100644
index 0000000000..802142b398
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/invalid-const-init/actual.js
@@ -0,0 +1 @@
+for (const x = 1 of y);
diff --git a/test/fixtures/esprima/es2015-for-of/invalid-const-init/options.json b/test/fixtures/esprima/es2015-for-of/invalid-const-init/options.json
new file mode 100644
index 0000000000..8bb9a5f99b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/invalid-const-init/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:17)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/invalid-let-init/actual.js b/test/fixtures/esprima/es2015-for-of/invalid-let-init/actual.js
new file mode 100644
index 0000000000..16c9d38843
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/invalid-let-init/actual.js
@@ -0,0 +1 @@
+for (let x = 1 of y);
diff --git a/test/fixtures/esprima/es2015-for-of/invalid-let-init/options.json b/test/fixtures/esprima/es2015-for-of/invalid-let-init/options.json
new file mode 100644
index 0000000000..7ca1e1ffbb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/invalid-let-init/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/invalid-lhs-init/actual.js b/test/fixtures/esprima/es2015-for-of/invalid-lhs-init/actual.js
new file mode 100644
index 0000000000..9150592412
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/invalid-lhs-init/actual.js
@@ -0,0 +1 @@
+for (this of that);
diff --git a/test/fixtures/esprima/es2015-for-of/invalid-lhs-init/options.json b/test/fixtures/esprima/es2015-for-of/invalid-lhs-init/options.json
new file mode 100644
index 0000000000..85f6f01102
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/invalid-lhs-init/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/invalid-var-init/actual.js b/test/fixtures/esprima/es2015-for-of/invalid-var-init/actual.js
new file mode 100644
index 0000000000..2b5eb5d3df
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/invalid-var-init/actual.js
@@ -0,0 +1 @@
+for (var x = 1 of y);
diff --git a/test/fixtures/esprima/es2015-for-of/invalid-var-init/expected.json b/test/fixtures/esprima/es2015-for-of/invalid-var-init/expected.json
new file mode 100644
index 0000000000..eec137e3bc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/invalid-var-init/expected.json
@@ -0,0 +1,146 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForOfStatement",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "value": 1,
+ "rawValue": 1,
+ "raw": "1"
+ }
+ }
+ ],
+ "kind": "var"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "y"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json b/test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json
new file mode 100644
index 0000000000..98d7123790
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:15)"
+}
diff --git a/test/fixtures/esprima/es2015-for-of/let-of-of/actual.js b/test/fixtures/esprima/es2015-for-of/let-of-of/actual.js
new file mode 100644
index 0000000000..cbc3509ff4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/let-of-of/actual.js
@@ -0,0 +1 @@
+for (let of of xyz);
diff --git a/test/fixtures/esprima/es2015-for-of/let-of-of/expected.json b/test/fixtures/esprima/es2015-for-of/let-of-of/expected.json
new file mode 100644
index 0000000000..1af67a2a58
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/let-of-of/expected.json
@@ -0,0 +1,129 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForOfStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "of"
+ },
+ "init": null
+ }
+ ],
+ "kind": "let"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "xyz"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-for-of/unexpected-number/actual.js b/test/fixtures/esprima/es2015-for-of/unexpected-number/actual.js
new file mode 100644
index 0000000000..c2ff917432
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/unexpected-number/actual.js
@@ -0,0 +1 @@
+for (const of 42);
diff --git a/test/fixtures/esprima/es2015-for-of/unexpected-number/options.json b/test/fixtures/esprima/es2015-for-of/unexpected-number/options.json
new file mode 100644
index 0000000000..51c483f3d3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-for-of/unexpected-number/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/actual.js b/test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/actual.js
new file mode 100644
index 0000000000..d36f1062d1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/actual.js
@@ -0,0 +1 @@
+(function*({yield}) {})
diff --git a/test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/expected.json b/test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/expected.json
new file mode 100644
index 0000000000..4b57db559b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/expected.json
@@ -0,0 +1,153 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "ObjectPattern",
+ "start": 11,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 12,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "yield"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "yield"
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": []
+ },
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/options.json b/test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/options.json
new file mode 100644
index 0000000000..26ddfc8190
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding yield (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-declaration-with-params/actual.js b/test/fixtures/esprima/es2015-generator/generator-declaration-with-params/actual.js
new file mode 100644
index 0000000000..cdbfd3f4f6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-params/actual.js
@@ -0,0 +1 @@
+function *foo(x, y, z) {}
diff --git a/test/fixtures/esprima/es2015-generator/generator-declaration-with-params/expected.json b/test/fixtures/esprima/es2015-generator/generator-declaration-with-params/expected.json
new file mode 100644
index 0000000000..94810ff25f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-params/expected.json
@@ -0,0 +1,132 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "foo"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "x"
+ },
+ {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "y"
+ },
+ {
+ "type": "Identifier",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "z"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/actual.js b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/actual.js
new file mode 100644
index 0000000000..fd4f8e1962
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/actual.js
@@ -0,0 +1 @@
+function *foo() { yield* 3; }
diff --git a/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json
new file mode 100644
index 0000000000..b1904263e7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json
@@ -0,0 +1,137 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "foo"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 18,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 18,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "delegate": true,
+ "argument": {
+ "type": "NumberLiteral",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/actual.js b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/actual.js
new file mode 100644
index 0000000000..52ac303f0c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/actual.js
@@ -0,0 +1 @@
+function *foo() { yield 3; }
diff --git a/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json
new file mode 100644
index 0000000000..586f8e1856
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json
@@ -0,0 +1,137 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "foo"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 18,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 18,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "delegate": false,
+ "argument": {
+ "type": "NumberLiteral",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-declaration/actual.js b/test/fixtures/esprima/es2015-generator/generator-declaration/actual.js
new file mode 100644
index 0000000000..7c42189626
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-declaration/actual.js
@@ -0,0 +1 @@
+function *foo() {}
diff --git a/test/fixtures/esprima/es2015-generator/generator-declaration/expected.json b/test/fixtures/esprima/es2015-generator/generator-declaration/expected.json
new file mode 100644
index 0000000000..a222c7d25a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-declaration/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "foo"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/actual.js b/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/actual.js
new file mode 100644
index 0000000000..855b74300d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/actual.js
@@ -0,0 +1 @@
+(function*(...x) {})
diff --git a/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json b/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json
new file mode 100644
index 0000000000..edd55ba2ea
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "RestElement",
+ "start": 11,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "x"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-expression-with-params/actual.js b/test/fixtures/esprima/es2015-generator/generator-expression-with-params/actual.js
new file mode 100644
index 0000000000..49568d61ac
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-params/actual.js
@@ -0,0 +1 @@
+(function*(x, y, z) {})
diff --git a/test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json b/test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json
new file mode 100644
index 0000000000..dcddd48350
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json
@@ -0,0 +1,137 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "x"
+ },
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "y"
+ },
+ {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "z"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/actual.js b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/actual.js
new file mode 100644
index 0000000000..7d1d130e6b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/actual.js
@@ -0,0 +1 @@
+(function*(x, y, z) { yield* x; })
diff --git a/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/expected.json b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/expected.json
new file mode 100644
index 0000000000..15d56c524b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/expected.json
@@ -0,0 +1,185 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "x"
+ },
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "y"
+ },
+ {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "z"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 22,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "delegate": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 29,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/actual.js b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/actual.js
new file mode 100644
index 0000000000..9fcc58a8cc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/actual.js
@@ -0,0 +1 @@
+(function*() { yield 3; })
diff --git a/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json
new file mode 100644
index 0000000000..6bc100acb2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json
@@ -0,0 +1,140 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 15,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 15,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "delegate": false,
+ "argument": {
+ "type": "NumberLiteral",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ }
+ }
+ ],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-expression/actual.js b/test/fixtures/esprima/es2015-generator/generator-expression/actual.js
new file mode 100644
index 0000000000..daa6bf5b22
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-expression/actual.js
@@ -0,0 +1 @@
+(function*() {})
diff --git a/test/fixtures/esprima/es2015-generator/generator-expression/expected.json b/test/fixtures/esprima/es2015-generator/generator-expression/expected.json
new file mode 100644
index 0000000000..9cb0b17ba1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-expression/expected.json
@@ -0,0 +1,88 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-computed-name/actual.js b/test/fixtures/esprima/es2015-generator/generator-method-with-computed-name/actual.js
new file mode 100644
index 0000000000..0739904dc1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-computed-name/actual.js
@@ -0,0 +1,3 @@
+(function*() {
+ { *[yield iter]() {} }
+})
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-computed-name/options.json b/test/fixtures/esprima/es2015-generator/generator-method-with-computed-name/options.json
new file mode 100644
index 0000000000..f86bbd48e9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-computed-name/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:6)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/actual.js b/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/actual.js
new file mode 100644
index 0000000000..c55ce55133
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/actual.js
@@ -0,0 +1 @@
+({ *[yield iter]() {} })
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/options.json b/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/options.json
new file mode 100644
index 0000000000..3e33f7730f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-params/actual.js b/test/fixtures/esprima/es2015-generator/generator-method-with-params/actual.js
new file mode 100644
index 0000000000..5d0406edaa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-params/actual.js
@@ -0,0 +1 @@
+({ *foo(x, y, z) {} })
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json b/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json
new file mode 100644
index 0000000000..ef567c630d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json
@@ -0,0 +1,174 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 3,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "x"
+ },
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "y"
+ },
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "z"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/actual.js b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/actual.js
new file mode 100644
index 0000000000..84c3ef4bd2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/actual.js
@@ -0,0 +1 @@
+({ *foo() { yield* 3; } })
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json
new file mode 100644
index 0000000000..a261ce50a1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json
@@ -0,0 +1,177 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 3,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 10,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 12,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 12,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "delegate": true,
+ "argument": {
+ "type": "NumberLiteral",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/actual.js b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/actual.js
new file mode 100644
index 0000000000..e356cfaefc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/actual.js
@@ -0,0 +1 @@
+({ *foo() { yield 3; } })
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json
new file mode 100644
index 0000000000..d43ba66132
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json
@@ -0,0 +1,177 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 3,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 10,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 12,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 12,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "delegate": false,
+ "argument": {
+ "type": "NumberLiteral",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/actual.js b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/actual.js
new file mode 100644
index 0000000000..13ebbabcf8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/actual.js
@@ -0,0 +1,4 @@
+({ *foo() {
+ yield
+ 3
+} })
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json
new file mode 100644
index 0000000000..addacb6d05
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json
@@ -0,0 +1,193 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 4,
+ "column": 3
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 3,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 4,
+ "column": 1
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 10,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 4,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "delegate": false,
+ "argument": null
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 3,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 3,
+ "column": 3
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield/actual.js b/test/fixtures/esprima/es2015-generator/generator-method-with-yield/actual.js
new file mode 100644
index 0000000000..8eea58fd39
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield/actual.js
@@ -0,0 +1 @@
+({ *foo() { yield; } })
diff --git a/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json b/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json
new file mode 100644
index 0000000000..9bd0e0fc9b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json
@@ -0,0 +1,158 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 3,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 10,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 12,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 12,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "delegate": false,
+ "argument": null
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-method/actual.js b/test/fixtures/esprima/es2015-generator/generator-method/actual.js
new file mode 100644
index 0000000000..c6a22b0ea4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method/actual.js
@@ -0,0 +1 @@
+({ *foo() {} })
diff --git a/test/fixtures/esprima/es2015-generator/generator-method/expected.json b/test/fixtures/esprima/es2015-generator/generator-method/expected.json
new file mode 100644
index 0000000000..1edf3cf6b7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-method/expected.json
@@ -0,0 +1,125 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 10,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/actual.js b/test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/actual.js
new file mode 100644
index 0000000000..c8bbdf1d0e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/actual.js
@@ -0,0 +1,3 @@
+(function*() {
+ function(x = yield 3) {}
+})
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/options.json b/test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/options.json
new file mode 100644
index 0000000000..690a8e9e31
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/actual.js b/test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/actual.js
new file mode 100644
index 0000000000..3de539ac3f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/actual.js
@@ -0,0 +1,3 @@
+(function*() {
+ function({x: y = yield 3}) {}
+})
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/options.json b/test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/options.json
new file mode 100644
index 0000000000..690a8e9e31
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/actual.js b/test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/actual.js
new file mode 100644
index 0000000000..7bc0064073
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/actual.js
@@ -0,0 +1,3 @@
+(function*() {
+ function({[yield 3]: y}) {}
+})
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/options.json b/test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/options.json
new file mode 100644
index 0000000000..690a8e9e31
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-element/actual.js b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-element/actual.js
new file mode 100644
index 0000000000..bc7938c174
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-element/actual.js
@@ -0,0 +1,3 @@
+(function*() {
+ function*(x = yield 3) {}
+})
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-element/options.json b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-element/options.json
new file mode 100644
index 0000000000..38ea64b097
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-element/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:13)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-property/actual.js b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-property/actual.js
new file mode 100644
index 0000000000..c219639513
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-property/actual.js
@@ -0,0 +1,3 @@
+(function*() {
+ function*({x: y = yield 3}) {}
+})
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-property/options.json b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-property/options.json
new file mode 100644
index 0000000000..38ea64b097
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-property/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:13)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-computed-property-name/actual.js b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-computed-property-name/actual.js
new file mode 100644
index 0000000000..1ca20284b3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-computed-property-name/actual.js
@@ -0,0 +1,3 @@
+(function*() {
+ function*({[yield 3]: y}) {}
+})
diff --git a/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-computed-property-name/options.json b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-computed-property-name/options.json
new file mode 100644
index 0000000000..38ea64b097
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-computed-property-name/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:13)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/incomplete-yield-delegate/actual.js b/test/fixtures/esprima/es2015-generator/incomplete-yield-delegate/actual.js
new file mode 100644
index 0000000000..f0d07c0140
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/incomplete-yield-delegate/actual.js
@@ -0,0 +1 @@
+(function*() { yield* })
diff --git a/test/fixtures/esprima/es2015-generator/incomplete-yield-delegate/options.json b/test/fixtures/esprima/es2015-generator/incomplete-yield-delegate/options.json
new file mode 100644
index 0000000000..b23f881870
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/incomplete-yield-delegate/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:22)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/malformed-generator-method-2/actual.js b/test/fixtures/esprima/es2015-generator/malformed-generator-method-2/actual.js
new file mode 100644
index 0000000000..0273d50d68
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/malformed-generator-method-2/actual.js
@@ -0,0 +1 @@
+class Foo { * }
diff --git a/test/fixtures/esprima/es2015-generator/malformed-generator-method-2/options.json b/test/fixtures/esprima/es2015-generator/malformed-generator-method-2/options.json
new file mode 100644
index 0000000000..51c483f3d3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/malformed-generator-method-2/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/malformed-generator-method/actual.js b/test/fixtures/esprima/es2015-generator/malformed-generator-method/actual.js
new file mode 100644
index 0000000000..f34ab0f700
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/malformed-generator-method/actual.js
@@ -0,0 +1 @@
+({ * })
diff --git a/test/fixtures/esprima/es2015-generator/malformed-generator-method/options.json b/test/fixtures/esprima/es2015-generator/malformed-generator-method/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/malformed-generator-method/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/static-generator-method-with-computed-name/actual.js b/test/fixtures/esprima/es2015-generator/static-generator-method-with-computed-name/actual.js
new file mode 100644
index 0000000000..5252f9a97d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/static-generator-method-with-computed-name/actual.js
@@ -0,0 +1 @@
+class Foo { static *[foo]() {} }
diff --git a/test/fixtures/esprima/es2015-generator/static-generator-method-with-computed-name/expected.json b/test/fixtures/esprima/es2015-generator/static-generator-method-with-computed-name/expected.json
new file mode 100644
index 0000000000..39c163121b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/static-generator-method-with-computed-name/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "Foo"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 10,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 12,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "computed": true,
+ "key": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "foo"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 28,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-generator/static-generator-method/actual.js b/test/fixtures/esprima/es2015-generator/static-generator-method/actual.js
new file mode 100644
index 0000000000..6644eb190c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/static-generator-method/actual.js
@@ -0,0 +1 @@
+class Foo { static *foo() {} }
diff --git a/test/fixtures/esprima/es2015-generator/static-generator-method/expected.json b/test/fixtures/esprima/es2015-generator/static-generator-method/expected.json
new file mode 100644
index 0000000000..655985c272
--- /dev/null
+++ b/test/fixtures/esprima/es2015-generator/static-generator-method/expected.json
@@ -0,0 +1,138 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "Foo"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 10,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 12,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "foo"
+ },
+ "static": true,
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 26,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/actual.js b/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/actual.js
new file mode 100644
index 0000000000..2526e7ed1d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/actual.js
@@ -0,0 +1 @@
+function await() {}
diff --git a/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/expected.json b/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/expected.json
new file mode 100644
index 0000000000..e1bd544880
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "await"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/options.json b/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/options.json
new file mode 100644
index 0000000000..328b1ddde8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/actual.js b/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/actual.js
new file mode 100644
index 0000000000..e66fe1911a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/actual.js
@@ -0,0 +1 @@
+var source = '\uD800!';
diff --git a/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/expected.json b/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/expected.json
new file mode 100644
index 0000000000..8a8057346c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "value": "�!",
+ "rawValue": "�!",
+ "raw": "'\\uD800!'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/options.json b/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/dakuten_handakuten/actual.js b/test/fixtures/esprima/es2015-identifier/dakuten_handakuten/actual.js
new file mode 100644
index 0000000000..38d91a508a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/dakuten_handakuten/actual.js
@@ -0,0 +1 @@
+゛+ ゜
diff --git a/test/fixtures/esprima/es2015-identifier/dakuten_handakuten/expected.json b/test/fixtures/esprima/es2015-identifier/dakuten_handakuten/expected.json
new file mode 100644
index 0000000000..777d6344e3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/dakuten_handakuten/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "゛"
+ },
+ "operator": "+",
+ "right": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "゜"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_all/actual.js b/test/fixtures/esprima/es2015-identifier/escaped_all/actual.js
new file mode 100644
index 0000000000..918581760d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_all/actual.js
@@ -0,0 +1 @@
+var \u{41}\u{42}\u{43};
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_all/expected.json b/test/fixtures/esprima/es2015-identifier/escaped_all/expected.json
new file mode 100644
index 0000000000..e71aacfe96
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_all/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "ABC"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_math_alef/actual.js b/test/fixtures/esprima/es2015-identifier/escaped_math_alef/actual.js
new file mode 100644
index 0000000000..94262d79ba
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_math_alef/actual.js
@@ -0,0 +1 @@
+var \u{1EE00}
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_math_alef/expected.json b/test/fixtures/esprima/es2015-identifier/escaped_math_alef/expected.json
new file mode 100644
index 0000000000..720e46270b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_math_alef/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "𞸀"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_math_dal_part/actual.js b/test/fixtures/esprima/es2015-identifier/escaped_math_dal_part/actual.js
new file mode 100644
index 0000000000..dfeaf3553e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_math_dal_part/actual.js
@@ -0,0 +1 @@
+var _\u{1EE03}
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_math_dal_part/expected.json b/test/fixtures/esprima/es2015-identifier/escaped_math_dal_part/expected.json
new file mode 100644
index 0000000000..aac895c761
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_math_dal_part/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "_𞸃"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_math_kaf_lam/actual.js b/test/fixtures/esprima/es2015-identifier/escaped_math_kaf_lam/actual.js
new file mode 100644
index 0000000000..84eba349a4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_math_kaf_lam/actual.js
@@ -0,0 +1 @@
+var \u{1EE0A}\u{1EE0B}
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_math_kaf_lam/expected.json b/test/fixtures/esprima/es2015-identifier/escaped_math_kaf_lam/expected.json
new file mode 100644
index 0000000000..aeab4c908f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_math_kaf_lam/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "𞸊𞸋"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_math_zain_start/actual.js b/test/fixtures/esprima/es2015-identifier/escaped_math_zain_start/actual.js
new file mode 100644
index 0000000000..7b9341ce7e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_math_zain_start/actual.js
@@ -0,0 +1 @@
+var \u{1EE06}_$
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_math_zain_start/expected.json b/test/fixtures/esprima/es2015-identifier/escaped_math_zain_start/expected.json
new file mode 100644
index 0000000000..f3f71d5dd7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_math_zain_start/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "𞸆_$"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_part/actual.js b/test/fixtures/esprima/es2015-identifier/escaped_part/actual.js
new file mode 100644
index 0000000000..6f2d330a7a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_part/actual.js
@@ -0,0 +1 @@
+var A\u{42}C;
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_part/expected.json b/test/fixtures/esprima/es2015-identifier/escaped_part/expected.json
new file mode 100644
index 0000000000..538f851879
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_part/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "ABC"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_start/actual.js b/test/fixtures/esprima/es2015-identifier/escaped_start/actual.js
new file mode 100644
index 0000000000..a5bd7053f2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_start/actual.js
@@ -0,0 +1 @@
+var \u{41}BC;
diff --git a/test/fixtures/esprima/es2015-identifier/escaped_start/expected.json b/test/fixtures/esprima/es2015-identifier/escaped_start/expected.json
new file mode 100644
index 0000000000..538f851879
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/escaped_start/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "ABC"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/estimated/actual.js b/test/fixtures/esprima/es2015-identifier/estimated/actual.js
new file mode 100644
index 0000000000..5349d5bcfc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/estimated/actual.js
@@ -0,0 +1 @@
+let ℮
diff --git a/test/fixtures/esprima/es2015-identifier/estimated/expected.json b/test/fixtures/esprima/es2015-identifier/estimated/expected.json
new file mode 100644
index 0000000000..52b66afb75
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/estimated/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "℮"
+ },
+ "init": null
+ }
+ ],
+ "kind": "let"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/ethiopic_digits/actual.js b/test/fixtures/esprima/es2015-identifier/ethiopic_digits/actual.js
new file mode 100644
index 0000000000..43a8b95859
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/ethiopic_digits/actual.js
@@ -0,0 +1 @@
+var _፩፪፫፬፭፮፯፰፱
diff --git a/test/fixtures/esprima/es2015-identifier/ethiopic_digits/expected.json b/test/fixtures/esprima/es2015-identifier/ethiopic_digits/expected.json
new file mode 100644
index 0000000000..3c1f5449e8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/ethiopic_digits/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "_፩፪፫፬፭፮፯፰፱"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/invalid_escaped_surrogate_pairs/actual.js b/test/fixtures/esprima/es2015-identifier/invalid_escaped_surrogate_pairs/actual.js
new file mode 100644
index 0000000000..bf6b772173
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/invalid_escaped_surrogate_pairs/actual.js
@@ -0,0 +1 @@
+var \uD83B\uDE00
diff --git a/test/fixtures/esprima/es2015-identifier/invalid_escaped_surrogate_pairs/options.json b/test/fixtures/esprima/es2015-identifier/invalid_escaped_surrogate_pairs/options.json
new file mode 100644
index 0000000000..4bb33235bd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/invalid_escaped_surrogate_pairs/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Invalid Unicode escape (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/invalid_expression_await/actual.js b/test/fixtures/esprima/es2015-identifier/invalid_expression_await/actual.js
new file mode 100644
index 0000000000..8d5a78d2d2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/invalid_expression_await/actual.js
@@ -0,0 +1 @@
+export var answer = await + 1;
diff --git a/test/fixtures/esprima/es2015-identifier/invalid_expression_await/options.json b/test/fixtures/esprima/es2015-identifier/invalid_expression_await/options.json
new file mode 100644
index 0000000000..53ee186d1b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/invalid_expression_await/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "'import' and 'export' may appear only with 'sourceType: module' (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/invalid_id_smp/actual.js b/test/fixtures/esprima/es2015-identifier/invalid_id_smp/actual.js
new file mode 100644
index 0000000000..9e1a5ea2ed
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/invalid_id_smp/actual.js
@@ -0,0 +1 @@
+var 🀒
diff --git a/test/fixtures/esprima/es2015-identifier/invalid_id_smp/options.json b/test/fixtures/esprima/es2015-identifier/invalid_id_smp/options.json
new file mode 100644
index 0000000000..905116584b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/invalid_id_smp/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected character '🀒' (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/invalid_var_await/actual.js b/test/fixtures/esprima/es2015-identifier/invalid_var_await/actual.js
new file mode 100644
index 0000000000..91cd4f3b2b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/invalid_var_await/actual.js
@@ -0,0 +1 @@
+export var await;
diff --git a/test/fixtures/esprima/es2015-identifier/invalid_var_await/options.json b/test/fixtures/esprima/es2015-identifier/invalid_var_await/options.json
new file mode 100644
index 0000000000..53ee186d1b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/invalid_var_await/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "'import' and 'export' may appear only with 'sourceType: module' (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/math_alef/actual.js b/test/fixtures/esprima/es2015-identifier/math_alef/actual.js
new file mode 100644
index 0000000000..965aec3af5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/math_alef/actual.js
@@ -0,0 +1 @@
+var 𞸀
diff --git a/test/fixtures/esprima/es2015-identifier/math_alef/expected.json b/test/fixtures/esprima/es2015-identifier/math_alef/expected.json
new file mode 100644
index 0000000000..95e4a8ea91
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/math_alef/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "𞸀"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/math_dal_part/actual.js b/test/fixtures/esprima/es2015-identifier/math_dal_part/actual.js
new file mode 100644
index 0000000000..2291df983e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/math_dal_part/actual.js
@@ -0,0 +1 @@
+var _𞸃
diff --git a/test/fixtures/esprima/es2015-identifier/math_dal_part/expected.json b/test/fixtures/esprima/es2015-identifier/math_dal_part/expected.json
new file mode 100644
index 0000000000..177536551c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/math_dal_part/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "_𞸃"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/math_kaf_lam/actual.js b/test/fixtures/esprima/es2015-identifier/math_kaf_lam/actual.js
new file mode 100644
index 0000000000..e1ad50f51d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/math_kaf_lam/actual.js
@@ -0,0 +1 @@
+var 𞸊𞸋
diff --git a/test/fixtures/esprima/es2015-identifier/math_kaf_lam/expected.json b/test/fixtures/esprima/es2015-identifier/math_kaf_lam/expected.json
new file mode 100644
index 0000000000..d3db5f5c03
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/math_kaf_lam/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "𞸊𞸋"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/math_zain_start/actual.js b/test/fixtures/esprima/es2015-identifier/math_zain_start/actual.js
new file mode 100644
index 0000000000..98c10c1f85
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/math_zain_start/actual.js
@@ -0,0 +1 @@
+var 𞸆_$
diff --git a/test/fixtures/esprima/es2015-identifier/math_zain_start/expected.json b/test/fixtures/esprima/es2015-identifier/math_zain_start/expected.json
new file mode 100644
index 0000000000..5124087f99
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/math_zain_start/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "𞸆_$"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/module_await/actual.js b/test/fixtures/esprima/es2015-identifier/module_await/actual.js
new file mode 100644
index 0000000000..aabfa0d200
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/module_await/actual.js
@@ -0,0 +1 @@
+await = 0;
diff --git a/test/fixtures/esprima/es2015-identifier/module_await/expected.json b/test/fixtures/esprima/es2015-identifier/module_await/expected.json
new file mode 100644
index 0000000000..73b2c92bcd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/module_await/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "await"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/valid_await/actual.js b/test/fixtures/esprima/es2015-identifier/valid_await/actual.js
new file mode 100644
index 0000000000..4b130dd06e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/valid_await/actual.js
@@ -0,0 +1 @@
+var await; (await);
diff --git a/test/fixtures/esprima/es2015-identifier/valid_await/expected.json b/test/fixtures/esprima/es2015-identifier/valid_await/expected.json
new file mode 100644
index 0000000000..26afe27079
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/valid_await/expected.json
@@ -0,0 +1,118 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "await"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 11,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "await",
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/weierstrass/actual.js b/test/fixtures/esprima/es2015-identifier/weierstrass/actual.js
new file mode 100644
index 0000000000..23b440eeed
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/weierstrass/actual.js
@@ -0,0 +1 @@
+var ℘;
diff --git a/test/fixtures/esprima/es2015-identifier/weierstrass/expected.json b/test/fixtures/esprima/es2015-identifier/weierstrass/expected.json
new file mode 100644
index 0000000000..0fb54a0f5f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/weierstrass/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "℘"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-identifier/weierstrass_weierstrass/actual.js b/test/fixtures/esprima/es2015-identifier/weierstrass_weierstrass/actual.js
new file mode 100644
index 0000000000..3fc1e2a32e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/weierstrass_weierstrass/actual.js
@@ -0,0 +1 @@
+var ℘\u2118
diff --git a/test/fixtures/esprima/es2015-identifier/weierstrass_weierstrass/expected.json b/test/fixtures/esprima/es2015-identifier/weierstrass_weierstrass/expected.json
new file mode 100644
index 0000000000..b6bb7d481d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-identifier/weierstrass_weierstrass/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "℘℘"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/actual.js
new file mode 100644
index 0000000000..e544977b3a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/actual.js
@@ -0,0 +1 @@
+import foo, {bar} from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json
new file mode 100644
index 0000000000..918d5dc76f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json
@@ -0,0 +1,149 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 7,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "foo"
+ }
+ },
+ {
+ "type": "ImportSpecifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "bar"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "bar"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 23,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/actual.js
new file mode 100644
index 0000000000..084fa0cdd1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/actual.js
@@ -0,0 +1 @@
+import foo, * as bar from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json
new file mode 100644
index 0000000000..1481257a6e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json
@@ -0,0 +1,133 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 7,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "foo"
+ }
+ },
+ {
+ "type": "ImportNamespaceSpecifier",
+ "start": 12,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "bar"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default-as/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-default-as/actual.js
new file mode 100644
index 0000000000..96c936db10
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-default-as/actual.js
@@ -0,0 +1 @@
+import {default as foo} from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json
new file mode 100644
index 0000000000..90e760b5d0
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json
@@ -0,0 +1,118 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportSpecifier",
+ "start": 8,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "default"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 29,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-default/actual.js
new file mode 100644
index 0000000000..8d1420050a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-default/actual.js
@@ -0,0 +1 @@
+import foo from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json
new file mode 100644
index 0000000000..68eab4b614
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json
@@ -0,0 +1,102 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 7,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 16,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-jquery/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-jquery/actual.js
new file mode 100644
index 0000000000..ea74241b4b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-jquery/actual.js
@@ -0,0 +1 @@
+import $ from "jquery"
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json
new file mode 100644
index 0000000000..d1465085b3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json
@@ -0,0 +1,102 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "$"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 14,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "extra": {
+ "rawValue": "jquery",
+ "raw": "\"jquery\""
+ },
+ "value": "jquery"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-module/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-module/actual.js
new file mode 100644
index 0000000000..c0748305d5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-module/actual.js
@@ -0,0 +1 @@
+import "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json
new file mode 100644
index 0000000000..1d1c75f23e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json
@@ -0,0 +1,70 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "specifiers": [],
+ "source": {
+ "type": "StringLiteral",
+ "start": 7,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/actual.js
new file mode 100644
index 0000000000..769f3b3d0c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/actual.js
@@ -0,0 +1 @@
+import {bar as baz} from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json
new file mode 100644
index 0000000000..158d42da07
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json
@@ -0,0 +1,118 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportSpecifier",
+ "start": 8,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "bar"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "baz"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 25,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/actual.js
new file mode 100644
index 0000000000..5198ead3cd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/actual.js
@@ -0,0 +1 @@
+import {bar as baz, xyz} from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json
new file mode 100644
index 0000000000..a3c950ab9c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json
@@ -0,0 +1,165 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportSpecifier",
+ "start": 8,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "bar"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "baz"
+ }
+ },
+ {
+ "type": "ImportSpecifier",
+ "start": 20,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "xyz"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "xyz"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 30,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-empty/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-named-empty/actual.js
new file mode 100644
index 0000000000..5faab37ebb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-empty/actual.js
@@ -0,0 +1 @@
+import {} from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json
new file mode 100644
index 0000000000..92681f683c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json
@@ -0,0 +1,70 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "specifiers": [],
+ "source": {
+ "type": "StringLiteral",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/actual.js
new file mode 100644
index 0000000000..fc80c74dd7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/actual.js
@@ -0,0 +1 @@
+import {bar} from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json
new file mode 100644
index 0000000000..d328366be5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json
@@ -0,0 +1,118 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportSpecifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "bar"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "bar"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 18,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/actual.js
new file mode 100644
index 0000000000..c2e95853d6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/actual.js
@@ -0,0 +1 @@
+import {bar, baz,} from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json
new file mode 100644
index 0000000000..fa924672aa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json
@@ -0,0 +1,165 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportSpecifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "bar"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "bar"
+ }
+ },
+ {
+ "type": "ImportSpecifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "baz"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "baz"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 24,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/actual.js
new file mode 100644
index 0000000000..2fb83c2349
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/actual.js
@@ -0,0 +1 @@
+import {bar, baz} from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json
new file mode 100644
index 0000000000..4cffe066fd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json
@@ -0,0 +1,165 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportSpecifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "bar"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "bar"
+ }
+ },
+ {
+ "type": "ImportSpecifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "baz"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "baz"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 23,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/actual.js
new file mode 100644
index 0000000000..e55c077500
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/actual.js
@@ -0,0 +1 @@
+import * as foo from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json
new file mode 100644
index 0000000000..cdb990cbdc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json
@@ -0,0 +1,102 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportNamespaceSpecifier",
+ "start": 7,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 21,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/actual.js b/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/actual.js
new file mode 100644
index 0000000000..ced8a86bb8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/actual.js
@@ -0,0 +1 @@
+import { null as nil } from "bar"
diff --git a/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json
new file mode 100644
index 0000000000..378e45b83b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json
@@ -0,0 +1,118 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportSpecifier",
+ "start": 9,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "imported": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "null"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "nil"
+ }
+ }
+ ],
+ "source": {
+ "type": "StringLiteral",
+ "start": 28,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named-after-default/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named-after-default/actual.js
new file mode 100644
index 0000000000..69aac7e8e1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named-after-default/actual.js
@@ -0,0 +1 @@
+import foo, {bar}, foo from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named-after-default/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named-after-default/options.json
new file mode 100644
index 0000000000..8bb9a5f99b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named-after-default/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:17)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named/actual.js
new file mode 100644
index 0000000000..5be12dab64
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named/actual.js
@@ -0,0 +1 @@
+import {bar}, foo from "foo"
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-missing-module-specifier/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-missing-module-specifier/actual.js
new file mode 100644
index 0000000000..ddf557475a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-missing-module-specifier/actual.js
@@ -0,0 +1 @@
+import foo
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-missing-module-specifier/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-missing-module-specifier/options.json
new file mode 100644
index 0000000000..328b1ddde8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-missing-module-specifier/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-module-specifier/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-module-specifier/actual.js
new file mode 100644
index 0000000000..16e3ea2897
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-module-specifier/actual.js
@@ -0,0 +1 @@
+import foo from bar;
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-module-specifier/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-module-specifier/options.json
new file mode 100644
index 0000000000..89e36d9013
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-module-specifier/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:16)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/actual.js
new file mode 100644
index 0000000000..6399a1a662
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/actual.js
@@ -0,0 +1 @@
+import default from "foo"
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-comma/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-comma/actual.js
new file mode 100644
index 0000000000..e54f9c16f5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-comma/actual.js
@@ -0,0 +1 @@
+import foo { bar } from "bar";
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-comma/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-comma/options.json
new file mode 100644
index 0000000000..3e33f7730f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-comma/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-module-specifier/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-module-specifier/actual.js
new file mode 100644
index 0000000000..338ebc128b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-module-specifier/actual.js
@@ -0,0 +1 @@
+import { foo, bar }
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-module-specifier/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-module-specifier/options.json
new file mode 100644
index 0000000000..1e730e1707
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-module-specifier/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:19)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-module-specifier/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-module-specifier/actual.js
new file mode 100644
index 0000000000..15dda167c6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-module-specifier/actual.js
@@ -0,0 +1 @@
+export {foo} from bar
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-module-specifier/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-module-specifier/options.json
new file mode 100644
index 0000000000..2a73699bc2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-module-specifier/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-named/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-named/actual.js
new file mode 100644
index 0000000000..a0557bf0ea
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-named/actual.js
@@ -0,0 +1 @@
+import {bar}, {foo} from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-named/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-named/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-named/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-namespace/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-namespace/actual.js
new file mode 100644
index 0000000000..24cede9de6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-namespace/actual.js
@@ -0,0 +1 @@
+import * as foo, {bar} from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-namespace/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-namespace/options.json
new file mode 100644
index 0000000000..7ca1e1ffbb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-namespace/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-as-missing-from/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-as-missing-from/actual.js
new file mode 100644
index 0000000000..5d7daedfbd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-as-missing-from/actual.js
@@ -0,0 +1 @@
+import {default as foo}
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-as-missing-from/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-as-missing-from/options.json
new file mode 100644
index 0000000000..2ddc9e708f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-as-missing-from/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:23)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-after-named/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-after-named/actual.js
new file mode 100644
index 0000000000..09d0d344e6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-after-named/actual.js
@@ -0,0 +1 @@
+import {bar}, * as foo from "foo";
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-after-named/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-after-named/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-after-named/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-missing-as/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-missing-as/actual.js
new file mode 100644
index 0000000000..4382a94adb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-missing-as/actual.js
@@ -0,0 +1 @@
+import * from "foo"
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-missing-as/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-missing-as/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-missing-as/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/actual.js b/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/actual.js
new file mode 100644
index 0000000000..297310b37d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/actual.js
@@ -0,0 +1 @@
+import foo, from "bar";
diff --git a/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/options.json b/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/modules/export-default-function-expression/options.json b/test/fixtures/esprima/es2015-import-declaration/options.json
similarity index 100%
rename from test/fixtures/harmony/modules/export-default-function-expression/options.json
rename to test/fixtures/esprima/es2015-import-declaration/options.json
diff --git a/test/fixtures/esprima/es2015-lexical-declaration/invalid_complex_binding_without_init/actual.js b/test/fixtures/esprima/es2015-lexical-declaration/invalid_complex_binding_without_init/actual.js
new file mode 100644
index 0000000000..ba39fedac6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-lexical-declaration/invalid_complex_binding_without_init/actual.js
@@ -0,0 +1 @@
+let []
diff --git a/test/fixtures/esprima/es2015-lexical-declaration/invalid_complex_binding_without_init/options.json b/test/fixtures/esprima/es2015-lexical-declaration/invalid_complex_binding_without_init/options.json
new file mode 100644
index 0000000000..8cb567ee77
--- /dev/null
+++ b/test/fixtures/esprima/es2015-lexical-declaration/invalid_complex_binding_without_init/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Complex binding patterns require an initialization value (1:6)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/actual.js b/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/actual.js
new file mode 100644
index 0000000000..2c6e10ed33
--- /dev/null
+++ b/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/actual.js
@@ -0,0 +1 @@
+for (const x = 0 in y){}
diff --git a/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/options.json b/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/options.json
new file mode 100644
index 0000000000..8bb9a5f99b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:17)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/actual.js b/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/actual.js
new file mode 100644
index 0000000000..6686af7386
--- /dev/null
+++ b/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/actual.js
@@ -0,0 +1 @@
+for (let x = 0 in y){}
diff --git a/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/options.json b/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/options.json
new file mode 100644
index 0000000000..7ca1e1ffbb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/actual.js b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/actual.js
new file mode 100644
index 0000000000..5df03fa0b7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/actual.js
@@ -0,0 +1 @@
+switch (answer) { case 42: let t = 42; break; }
diff --git a/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json
new file mode 100644
index 0000000000..2d90f27140
--- /dev/null
+++ b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json
@@ -0,0 +1,189 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "SwitchStatement",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "discriminant": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "answer"
+ },
+ "cases": [
+ {
+ "type": "SwitchCase",
+ "start": 18,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "consequent": [
+ {
+ "type": "VariableDeclaration",
+ "start": 27,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 31,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "name": "t"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 35,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ {
+ "type": "BreakStatement",
+ "start": 39,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "label": null
+ }
+ ],
+ "test": {
+ "type": "NumberLiteral",
+ "start": 23,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ]
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-meta-property/.invalid-new-target/actual.js b/test/fixtures/esprima/es2015-meta-property/.invalid-new-target/actual.js
new file mode 100644
index 0000000000..46b13d0e56
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/.invalid-new-target/actual.js
@@ -0,0 +1 @@
+var x = new.target;
diff --git a/test/fixtures/esprima/es2015-meta-property/.invalid-new-target/expected.json b/test/fixtures/esprima/es2015-meta-property/.invalid-new-target/expected.json
new file mode 100644
index 0000000000..c2ab0aba1b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/.invalid-new-target/expected.json
@@ -0,0 +1,129 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "MetaProperty",
+ "start": 8,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "meta": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "new"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "target"
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-meta-property/.invalid-new-target/options.json b/test/fixtures/esprima/es2015-meta-property/.invalid-new-target/options.json
new file mode 100644
index 0000000000..27f6e27de8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/.invalid-new-target/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:13)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-meta-property/assign-new-target/actual.js b/test/fixtures/esprima/es2015-meta-property/assign-new-target/actual.js
new file mode 100644
index 0000000000..34426e1f42
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/assign-new-target/actual.js
@@ -0,0 +1,3 @@
+function f() {
+ let x = new.target;
+}
diff --git a/test/fixtures/esprima/es2015-meta-property/assign-new-target/expected.json b/test/fixtures/esprima/es2015-meta-property/assign-new-target/expected.json
new file mode 100644
index 0000000000..e909c85c33
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/assign-new-target/expected.json
@@ -0,0 +1,180 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 19,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 23,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "MetaProperty",
+ "start": 27,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "meta": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "name": "new"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 16
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "name": "target"
+ }
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-meta-property/invalid-dots/actual.js b/test/fixtures/esprima/es2015-meta-property/invalid-dots/actual.js
new file mode 100644
index 0000000000..a535e5644b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/invalid-dots/actual.js
@@ -0,0 +1 @@
+var x = function() { y = new..target; }
diff --git a/test/fixtures/esprima/es2015-meta-property/invalid-dots/options.json b/test/fixtures/esprima/es2015-meta-property/invalid-dots/options.json
new file mode 100644
index 0000000000..4e08e9340e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/invalid-dots/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:29)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-meta-property/new-new-target/actual.js b/test/fixtures/esprima/es2015-meta-property/new-new-target/actual.js
new file mode 100644
index 0000000000..ac74ad9bc2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/new-new-target/actual.js
@@ -0,0 +1,3 @@
+function f() {
+ new new.target;
+}
diff --git a/test/fixtures/esprima/es2015-meta-property/new-new-target/expected.json b/test/fixtures/esprima/es2015-meta-property/new-new-target/expected.json
new file mode 100644
index 0000000000..545d3f05a9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/new-new-target/expected.json
@@ -0,0 +1,162 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 19,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "callee": {
+ "type": "MetaProperty",
+ "start": 23,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "meta": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "name": "new"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "name": "target"
+ }
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-meta-property/new-target-declaration/actual.js b/test/fixtures/esprima/es2015-meta-property/new-target-declaration/actual.js
new file mode 100644
index 0000000000..01687a0993
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/new-target-declaration/actual.js
@@ -0,0 +1,3 @@
+function f() {
+ new.target;
+}
diff --git a/test/fixtures/esprima/es2015-meta-property/new-target-declaration/expected.json b/test/fixtures/esprima/es2015-meta-property/new-target-declaration/expected.json
new file mode 100644
index 0000000000..154850a47c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/new-target-declaration/expected.json
@@ -0,0 +1,146 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "MetaProperty",
+ "start": 19,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "meta": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "name": "new"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "name": "target"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-meta-property/new-target-expression/actual.js b/test/fixtures/esprima/es2015-meta-property/new-target-expression/actual.js
new file mode 100644
index 0000000000..f8f320a995
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/new-target-expression/actual.js
@@ -0,0 +1 @@
+var f = function() { new.target; }
diff --git a/test/fixtures/esprima/es2015-meta-property/new-target-expression/expected.json b/test/fixtures/esprima/es2015-meta-property/new-target-expression/expected.json
new file mode 100644
index 0000000000..fdf1e48cdb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/new-target-expression/expected.json
@@ -0,0 +1,180 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "f"
+ },
+ "init": {
+ "type": "FunctionExpression",
+ "start": 8,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 21,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "MetaProperty",
+ "start": 21,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "meta": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "new"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 25,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "target"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-meta-property/new-target-invoke/actual.js b/test/fixtures/esprima/es2015-meta-property/new-target-invoke/actual.js
new file mode 100644
index 0000000000..bebd659c0c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/new-target-invoke/actual.js
@@ -0,0 +1,3 @@
+function f() {
+ new.target();
+}
diff --git a/test/fixtures/esprima/es2015-meta-property/new-target-invoke/expected.json b/test/fixtures/esprima/es2015-meta-property/new-target-invoke/expected.json
new file mode 100644
index 0000000000..4480d5f16b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/new-target-invoke/expected.json
@@ -0,0 +1,162 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "callee": {
+ "type": "MetaProperty",
+ "start": 19,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "meta": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "name": "new"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "name": "target"
+ }
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-meta-property/new-target-precedence/actual.js b/test/fixtures/esprima/es2015-meta-property/new-target-precedence/actual.js
new file mode 100644
index 0000000000..d5dded3f12
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/new-target-precedence/actual.js
@@ -0,0 +1,3 @@
+function f() {
+ new new.target()();
+}
diff --git a/test/fixtures/esprima/es2015-meta-property/new-target-precedence/expected.json b/test/fixtures/esprima/es2015-meta-property/new-target-precedence/expected.json
new file mode 100644
index 0000000000..3a85fec1a1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/new-target-precedence/expected.json
@@ -0,0 +1,178 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 19,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "callee": {
+ "type": "NewExpression",
+ "start": 19,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "callee": {
+ "type": "MetaProperty",
+ "start": 23,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "meta": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "name": "new"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "name": "target"
+ }
+ },
+ "arguments": []
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-meta-property/unknown-property/actual.js b/test/fixtures/esprima/es2015-meta-property/unknown-property/actual.js
new file mode 100644
index 0000000000..dc1b123d55
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/unknown-property/actual.js
@@ -0,0 +1 @@
+var f = function() { new.unknown_property; }
diff --git a/test/fixtures/esprima/es2015-meta-property/unknown-property/options.json b/test/fixtures/esprima/es2015-meta-property/unknown-property/options.json
new file mode 100644
index 0000000000..2985f64e65
--- /dev/null
+++ b/test/fixtures/esprima/es2015-meta-property/unknown-property/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "The only valid meta property for new is new.target (1:25)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0000/actual.js b/test/fixtures/esprima/es2015-method-definition/migrated_0000/actual.js
new file mode 100644
index 0000000000..9b4c1e304a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-method-definition/migrated_0000/actual.js
@@ -0,0 +1 @@
+x = { method() { } }
diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0000/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0000/expected.json
new file mode 100644
index 0000000000..880dce74c2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-method-definition/migrated_0000/expected.json
@@ -0,0 +1,154 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 4,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 6,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "method"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0001/actual.js b/test/fixtures/esprima/es2015-method-definition/migrated_0001/actual.js
new file mode 100644
index 0000000000..01ff4912cf
--- /dev/null
+++ b/test/fixtures/esprima/es2015-method-definition/migrated_0001/actual.js
@@ -0,0 +1 @@
+x = { method(test) { } }
diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0001/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0001/expected.json
new file mode 100644
index 0000000000..7d5dce4954
--- /dev/null
+++ b/test/fixtures/esprima/es2015-method-definition/migrated_0001/expected.json
@@ -0,0 +1,171 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 4,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 6,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "method"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 13,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "test"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0002/actual.js b/test/fixtures/esprima/es2015-method-definition/migrated_0002/actual.js
new file mode 100644
index 0000000000..0f3a2113e2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-method-definition/migrated_0002/actual.js
@@ -0,0 +1 @@
+x = { 'method'() { } }
diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json
new file mode 100644
index 0000000000..1030bf0af2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json
@@ -0,0 +1,158 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 6,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 6,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": "method",
+ "raw": "'method'"
+ },
+ "value": "method"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0003/actual.js b/test/fixtures/esprima/es2015-method-definition/migrated_0003/actual.js
new file mode 100644
index 0000000000..56936cfbd1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-method-definition/migrated_0003/actual.js
@@ -0,0 +1 @@
+x = { get() { } }
diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0003/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0003/expected.json
new file mode 100644
index 0000000000..0b0d3f1c10
--- /dev/null
+++ b/test/fixtures/esprima/es2015-method-definition/migrated_0003/expected.json
@@ -0,0 +1,154 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 4,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 6,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "get"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 12,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0004/actual.js b/test/fixtures/esprima/es2015-method-definition/migrated_0004/actual.js
new file mode 100644
index 0000000000..561e2f42f1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-method-definition/migrated_0004/actual.js
@@ -0,0 +1 @@
+x = { set() { } }
diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0004/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0004/expected.json
new file mode 100644
index 0000000000..b118b76443
--- /dev/null
+++ b/test/fixtures/esprima/es2015-method-definition/migrated_0004/expected.json
@@ -0,0 +1,154 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 4,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 6,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "set"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 12,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/actual.js
new file mode 100644
index 0000000000..3f9966ff99
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/actual.js
@@ -0,0 +1 @@
+({ get __proto(){}, "__proto__": null, __proto__: null, })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/expected.json
new file mode 100644
index 0000000000..6edbb3623f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/expected.json
@@ -0,0 +1,238 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "__proto"
+ },
+ "kind": "get",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "body": []
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "start": 20,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 20,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": "__proto__",
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 33,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ }
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 39,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 39,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 50,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 50
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ }
+ },
+ "kind": "init"
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/options.json
new file mode 100644
index 0000000000..57e02d3bf4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:39)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/actual.js
new file mode 100644
index 0000000000..e399af6d6d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/actual.js
@@ -0,0 +1 @@
+({ __proto__: null, "__proto__": null })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/expected.json
new file mode 100644
index 0000000000..9b1a68cb99
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/expected.json
@@ -0,0 +1,168 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ }
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 20,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 20,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": "__proto__",
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 33,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ }
+ },
+ "kind": "init"
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/options.json
new file mode 100644
index 0000000000..f36f2e1bd9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:20)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/actual.js
new file mode 100644
index 0000000000..c62a4ce1a1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/actual.js
@@ -0,0 +1 @@
+({ __proto__: null, __proto__ })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/expected.json
new file mode 100644
index 0000000000..957f3941af
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/expected.json
@@ -0,0 +1,170 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "Literal",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "value": null,
+ "rawValue": null,
+ "raw": "null"
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 20,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "__proto__"
+ }
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/options.json
new file mode 100644
index 0000000000..5c966843f4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:20)"
+}
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/actual.js
new file mode 100644
index 0000000000..112b5ff8de
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/actual.js
@@ -0,0 +1 @@
+({ __proto__: null, __proto__: null })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/expected.json
new file mode 100644
index 0000000000..853ec2ca42
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 3,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ }
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 20,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 31,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ }
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/options.json
new file mode 100644
index 0000000000..f36f2e1bd9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:20)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/actual.js
new file mode 100644
index 0000000000..4e890f9366
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/actual.js
@@ -0,0 +1 @@
+({ "__proto__": null, __proto__: null })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/expected.json
new file mode 100644
index 0000000000..4b2175d058
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/expected.json
@@ -0,0 +1,168 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 3,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "value": "__proto__",
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ }
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 22,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 33,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ }
+ },
+ "kind": "init"
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/options.json
new file mode 100644
index 0000000000..afd5a5116b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:22)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/actual.js
new file mode 100644
index 0000000000..2972018b5a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/actual.js
@@ -0,0 +1 @@
+({ "__proto__": null, __proto__ })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/expected.json
new file mode 100644
index 0000000000..22e6537ffa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/expected.json
@@ -0,0 +1,172 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Literal",
+ "start": 3,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "value": "__proto__",
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": {
+ "type": "Literal",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "value": null,
+ "rawValue": null,
+ "raw": "null"
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 22,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "__proto__"
+ }
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/options.json
new file mode 100644
index 0000000000..e19950ad14
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:22)"
+}
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/actual.js
new file mode 100644
index 0000000000..be94b24002
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/actual.js
@@ -0,0 +1 @@
+({ "__proto__": null, '__proto__': null })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/expected.json
new file mode 100644
index 0000000000..2a84426d88
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/expected.json
@@ -0,0 +1,170 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 3,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "value": "__proto__",
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ }
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 22,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 22,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "value": "__proto__",
+ "rawValue": "__proto__",
+ "raw": "'__proto__'"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 35,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ }
+ },
+ "kind": "init"
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/options.json
new file mode 100644
index 0000000000..afd5a5116b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:22)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/actual.js
new file mode 100644
index 0000000000..0d07da8456
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/actual.js
@@ -0,0 +1 @@
+({ set __proto__(x){}, "__proto__": null, __proto__: null, })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/expected.json
new file mode 100644
index 0000000000..7120e7bc0a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/expected.json
@@ -0,0 +1,255 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 60
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "set",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 16,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": []
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "start": 23,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 23,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": "__proto__",
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 36,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ }
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 42,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 53,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 53
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ }
+ },
+ "kind": "init"
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/options.json
new file mode 100644
index 0000000000..cf57a1fa83
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:42)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/actual.js
new file mode 100644
index 0000000000..9cf6d27e79
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/actual.js
@@ -0,0 +1 @@
+({ __proto__, __proto__: null })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/expected.json
new file mode 100644
index 0000000000..3f3242833e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/expected.json
@@ -0,0 +1,170 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ }
+ },
+ {
+ "type": "Property",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "Literal",
+ "start": 25,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": null,
+ "rawValue": null,
+ "raw": "null"
+ },
+ "kind": "init"
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/options.json
new file mode 100644
index 0000000000..a8b5ad2f5b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:14)"
+}
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/actual.js
new file mode 100644
index 0000000000..898082ce49
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/actual.js
@@ -0,0 +1 @@
+({ __proto__, "__proto__": null })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/expected.json
new file mode 100644
index 0000000000..c09f7f715b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/expected.json
@@ -0,0 +1,172 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ }
+ },
+ {
+ "type": "Property",
+ "start": 14,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Literal",
+ "start": 14,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "value": "__proto__",
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": {
+ "type": "Literal",
+ "start": 27,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": null,
+ "rawValue": null,
+ "raw": "null"
+ },
+ "kind": "init"
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/options.json
new file mode 100644
index 0000000000..a8b5ad2f5b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:14)"
+}
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/actual.js b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/actual.js
new file mode 100644
index 0000000000..785615c976
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/actual.js
@@ -0,0 +1 @@
+({ __proto__, __proto__ })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/expected.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/expected.json
new file mode 100644
index 0000000000..3de2340596
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/expected.json
@@ -0,0 +1,168 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ }
+ },
+ {
+ "type": "Property",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "__proto__"
+ }
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/options.json b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/options.json
new file mode 100644
index 0000000000..a8b5ad2f5b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:14)"
+}
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/actual.js b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/actual.js
new file mode 100644
index 0000000000..a3741bf749
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/actual.js
@@ -0,0 +1 @@
+({ __proto__: null, get __proto__(){}, set __proto__(x){} })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json
new file mode 100644
index 0000000000..41fa69789a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json
@@ -0,0 +1,247 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 60
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 60
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 60
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 3,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ }
+ }
+ },
+ {
+ "type": "ObjectMethod",
+ "start": 20,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "get",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 35,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ObjectMethod",
+ "start": 39,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 43,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 43
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "set",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 53,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 53
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 55,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 55
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/actual.js b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/actual.js
new file mode 100644
index 0000000000..b98cb5a0c5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/actual.js
@@ -0,0 +1 @@
+({ __proto__: null, get __proto__(){} })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json
new file mode 100644
index 0000000000..73ee6c7acf
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json
@@ -0,0 +1,174 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 3,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ }
+ }
+ },
+ {
+ "type": "ObjectMethod",
+ "start": 20,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "get",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 35,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/actual.js b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/actual.js
new file mode 100644
index 0000000000..b886d6e186
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/actual.js
@@ -0,0 +1 @@
+({ __proto__: null, __proto__(){}, })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json
new file mode 100644
index 0000000000..8213ba1bb4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json
@@ -0,0 +1,174 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 3,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ }
+ }
+ },
+ {
+ "type": "ObjectMethod",
+ "start": 20,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 31,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/actual.js b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/actual.js
new file mode 100644
index 0000000000..433662021a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/actual.js
@@ -0,0 +1 @@
+({ __proto__: null, set __proto__(x){} })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json
new file mode 100644
index 0000000000..3e06b6b52c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json
@@ -0,0 +1,191 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 3,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ }
+ }
+ },
+ {
+ "type": "ObjectMethod",
+ "start": 20,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "set",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 34,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 36,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/actual.js b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/actual.js
new file mode 100644
index 0000000000..08c6ed23ae
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/actual.js
@@ -0,0 +1 @@
+({ "__proto__": null, get __proto__(){}, set __proto__(x){} })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json
new file mode 100644
index 0000000000..a1524c4a1f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json
@@ -0,0 +1,251 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 3,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 3,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ }
+ }
+ },
+ {
+ "type": "ObjectMethod",
+ "start": 22,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 26,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "get",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 37,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "ObjectMethod",
+ "start": 41,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 45,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 45
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "set",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 55,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 55
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 57,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 57
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/actual.js b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/actual.js
new file mode 100644
index 0000000000..b0496bde96
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/actual.js
@@ -0,0 +1 @@
+({ "__proto__": null, get __proto__(){} })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json
new file mode 100644
index 0000000000..5fe032f20e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json
@@ -0,0 +1,178 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 3,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 3,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ }
+ }
+ },
+ {
+ "type": "ObjectMethod",
+ "start": 22,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 26,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "get",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 37,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/actual.js b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/actual.js
new file mode 100644
index 0000000000..9aaf992935
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/actual.js
@@ -0,0 +1 @@
+({ "__proto__": null, __proto__(){}, })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json
new file mode 100644
index 0000000000..2a6d87e4c9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json
@@ -0,0 +1,178 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 3,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 3,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ }
+ }
+ },
+ {
+ "type": "ObjectMethod",
+ "start": 22,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 33,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/actual.js b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/actual.js
new file mode 100644
index 0000000000..4481cb5890
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/actual.js
@@ -0,0 +1 @@
+({ "__proto__": null, set __proto__(x){} })
diff --git a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json
new file mode 100644
index 0000000000..d0c7453baa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json
@@ -0,0 +1,195 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 3,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 3,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": "__proto__",
+ "raw": "\"__proto__\""
+ },
+ "value": "__proto__"
+ },
+ "value": {
+ "type": "NullLiteral",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ }
+ }
+ },
+ {
+ "type": "ObjectMethod",
+ "start": 22,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 26,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "name": "__proto__"
+ },
+ "kind": "set",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 36,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 38,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-literal-property-value-shorthand/migrated_0000/actual.js b/test/fixtures/esprima/es2015-object-literal-property-value-shorthand/migrated_0000/actual.js
new file mode 100644
index 0000000000..02c62e5f34
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-literal-property-value-shorthand/migrated_0000/actual.js
@@ -0,0 +1 @@
+x = { y, z }
diff --git a/test/fixtures/esprima/es2015-object-literal-property-value-shorthand/migrated_0000/expected.json b/test/fixtures/esprima/es2015-object-literal-property-value-shorthand/migrated_0000/expected.json
new file mode 100644
index 0000000000..660265dd75
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-literal-property-value-shorthand/migrated_0000/expected.json
@@ -0,0 +1,198 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 4,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "y"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "y"
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "z"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "z"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-pattern/elision/actual.js b/test/fixtures/esprima/es2015-object-pattern/elision/actual.js
new file mode 100644
index 0000000000..458d6387cc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/elision/actual.js
@@ -0,0 +1 @@
+let {a,} = 0
diff --git a/test/fixtures/esprima/es2015-object-pattern/elision/expected.json b/test/fixtures/esprima/es2015-object-pattern/elision/expected.json
new file mode 100644
index 0000000000..7c4ad06015
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/elision/expected.json
@@ -0,0 +1,154 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-catch-param/actual.js b/test/fixtures/esprima/es2015-object-pattern/empty-catch-param/actual.js
new file mode 100644
index 0000000000..14d2f32e56
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/empty-catch-param/actual.js
@@ -0,0 +1 @@
+try { } catch ({}) {}
diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-catch-param/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-catch-param/expected.json
new file mode 100644
index 0000000000..360729bf4f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/empty-catch-param/expected.json
@@ -0,0 +1,113 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "body": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 8,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "param": {
+ "type": "ObjectPattern",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "properties": []
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-fn/actual.js b/test/fixtures/esprima/es2015-object-pattern/empty-fn/actual.js
new file mode 100644
index 0000000000..5b576774b5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/empty-fn/actual.js
@@ -0,0 +1 @@
+function a({}) {}
diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-fn/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-fn/expected.json
new file mode 100644
index 0000000000..fc8aa6cdb9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/empty-fn/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "ObjectPattern",
+ "start": 11,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "properties": []
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/actual.js b/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/actual.js
new file mode 100644
index 0000000000..23033126a8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/actual.js
@@ -0,0 +1 @@
+for (let {} in 0);
diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json
new file mode 100644
index 0000000000..25c24eb32b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForInStatement",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "properties": []
+ },
+ "init": null
+ }
+ ],
+ "kind": "let"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-lexical/actual.js b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/actual.js
new file mode 100644
index 0000000000..fe8923efef
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/actual.js
@@ -0,0 +1 @@
+let {} = 0
diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json
new file mode 100644
index 0000000000..82ed2b843a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "properties": []
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-var/actual.js b/test/fixtures/esprima/es2015-object-pattern/empty-var/actual.js
new file mode 100644
index 0000000000..8e5b5da7ca
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/empty-var/actual.js
@@ -0,0 +1 @@
+var {} = 0
diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json
new file mode 100644
index 0000000000..c910a2d773
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "properties": []
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-pattern/nested/actual.js b/test/fixtures/esprima/es2015-object-pattern/nested/actual.js
new file mode 100644
index 0000000000..82d997cb9b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/nested/actual.js
@@ -0,0 +1 @@
+let {a:{}} = 0
diff --git a/test/fixtures/esprima/es2015-object-pattern/nested/expected.json b/test/fixtures/esprima/es2015-object-pattern/nested/expected.json
new file mode 100644
index 0000000000..91ef151596
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/nested/expected.json
@@ -0,0 +1,154 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 5,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "ObjectPattern",
+ "start": 7,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "properties": []
+ }
+ }
+ ]
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-object-pattern/properties/actual.js b/test/fixtures/esprima/es2015-object-pattern/properties/actual.js
new file mode 100644
index 0000000000..37e1fb1514
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/properties/actual.js
@@ -0,0 +1 @@
+let {a,b=0,c:d,e:f=0,[g]:[h]}=0
diff --git a/test/fixtures/esprima/es2015-object-pattern/properties/expected.json b/test/fixtures/esprima/es2015-object-pattern/properties/expected.json
new file mode 100644
index 0000000000..385e1d7b27
--- /dev/null
+++ b/test/fixtures/esprima/es2015-object-pattern/properties/expected.json
@@ -0,0 +1,441 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 4,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 7,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "b"
+ },
+ "value": {
+ "type": "AssignmentPattern",
+ "start": 7,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "b"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 11,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "c"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "d"
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "e"
+ },
+ "value": {
+ "type": "AssignmentPattern",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "f"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 21,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": true,
+ "key": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "g"
+ },
+ "value": {
+ "type": "ArrayPattern",
+ "start": 25,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 26,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "h"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/actual.js b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/actual.js
new file mode 100644
index 0000000000..4daddb72ff
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/actual.js
@@ -0,0 +1 @@
+00
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json
new file mode 100644
index 0000000000..bcf619d9dd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "00"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/actual.js b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/actual.js
new file mode 100644
index 0000000000..8893f6d11d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/actual.js
@@ -0,0 +1 @@
+0o0
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json
new file mode 100644
index 0000000000..8a021344bb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0o0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/actual.js b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/actual.js
new file mode 100644
index 0000000000..2efa481a33
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/actual.js
@@ -0,0 +1 @@
+function test() {'use strict'; 0o0; }
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json
new file mode 100644
index 0000000000..aa7e6a2f80
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json
@@ -0,0 +1,157 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "test"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 31,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 31,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0o0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 17,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 17,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": "use strict",
+ "extra": {
+ "raw": "'use strict'",
+ "rawValue": "use strict"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/actual.js b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/actual.js
new file mode 100644
index 0000000000..11ec2e8006
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/actual.js
@@ -0,0 +1 @@
+0o2
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json
new file mode 100644
index 0000000000..118b2f32c6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "extra": {
+ "rawValue": 2,
+ "raw": "0o2"
+ },
+ "value": 2
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/actual.js b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/actual.js
new file mode 100644
index 0000000000..0d019e772e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/actual.js
@@ -0,0 +1 @@
+0o12
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json
new file mode 100644
index 0000000000..5636575a62
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "extra": {
+ "rawValue": 10,
+ "raw": "0o12"
+ },
+ "value": 10
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/actual.js b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/actual.js
new file mode 100644
index 0000000000..fa429fd56e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/actual.js
@@ -0,0 +1 @@
+0O0
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json
new file mode 100644
index 0000000000..7c2c994467
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json
@@ -0,0 +1,69 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0O0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/actual.js b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/actual.js
new file mode 100644
index 0000000000..ca79cb08e1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/actual.js
@@ -0,0 +1 @@
+function test() {'use strict'; 0O0; }
diff --git a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json
new file mode 100644
index 0000000000..306190058c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json
@@ -0,0 +1,157 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "test"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 31,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 31,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0O0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 17,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 17,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": "use strict",
+ "extra": {
+ "raw": "'use strict'",
+ "rawValue": "use strict"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-rest-parameter/function-declaration/actual.js b/test/fixtures/esprima/es2015-rest-parameter/function-declaration/actual.js
new file mode 100644
index 0000000000..712e8692f7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-rest-parameter/function-declaration/actual.js
@@ -0,0 +1 @@
+function f(a, ...b) {}
diff --git a/test/fixtures/esprima/es2015-rest-parameter/function-declaration/expected.json b/test/fixtures/esprima/es2015-rest-parameter/function-declaration/expected.json
new file mode 100644
index 0000000000..4a17d865f7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-rest-parameter/function-declaration/expected.json
@@ -0,0 +1,131 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "RestElement",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "b"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-rest-parameter/function-expression/actual.js b/test/fixtures/esprima/es2015-rest-parameter/function-expression/actual.js
new file mode 100644
index 0000000000..fa971224bb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-rest-parameter/function-expression/actual.js
@@ -0,0 +1 @@
+f = function(a, ...b) {}
diff --git a/test/fixtures/esprima/es2015-rest-parameter/function-expression/expected.json b/test/fixtures/esprima/es2015-rest-parameter/function-expression/expected.json
new file mode 100644
index 0000000000..d524d90df1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-rest-parameter/function-expression/expected.json
@@ -0,0 +1,163 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "f"
+ },
+ "right": {
+ "type": "FunctionExpression",
+ "start": 4,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "RestElement",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "b"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 22,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-rest-parameter/object-method/actual.js b/test/fixtures/esprima/es2015-rest-parameter/object-method/actual.js
new file mode 100644
index 0000000000..af5910b4fc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-rest-parameter/object-method/actual.js
@@ -0,0 +1 @@
+o = { f: function(a, ...b) {} }
diff --git a/test/fixtures/esprima/es2015-rest-parameter/object-method/expected.json b/test/fixtures/esprima/es2015-rest-parameter/object-method/expected.json
new file mode 100644
index 0000000000..b5c022b8a6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-rest-parameter/object-method/expected.json
@@ -0,0 +1,216 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "o"
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 4,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 6,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "f"
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "start": 9,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "RestElement",
+ "start": 21,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "b"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/actual.js b/test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/actual.js
new file mode 100644
index 0000000000..5099434fef
--- /dev/null
+++ b/test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/actual.js
@@ -0,0 +1 @@
+x = { method(...test) { } }
diff --git a/test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/expected.json b/test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/expected.json
new file mode 100644
index 0000000000..18295991cb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 4,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 6,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "method"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "RestElement",
+ "start": 13,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "test"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 22,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/call-multi-spread/actual.js b/test/fixtures/esprima/es2015-spread-element/call-multi-spread/actual.js
new file mode 100644
index 0000000000..35ce3a284a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/call-multi-spread/actual.js
@@ -0,0 +1 @@
+f(...x, ...y, ...z);
diff --git a/test/fixtures/harmony/uncategorised/59/expected.json b/test/fixtures/esprima/es2015-spread-element/call-multi-spread/expected.json
similarity index 51%
rename from test/fixtures/harmony/uncategorised/59/expected.json
rename to test/fixtures/esprima/es2015-spread-element/call-multi-spread/expected.json
index 438b7a59b1..2610b26d4f 100644
--- a/test/fixtures/harmony/uncategorised/59/expected.json
+++ b/test/fixtures/esprima/es2015-spread-element/call-multi-spread/expected.json
@@ -1,7 +1,7 @@
{
"type": "File",
"start": 0,
- "end": 54,
+ "end": 20,
"loc": {
"start": {
"line": 1,
@@ -9,13 +9,13 @@
},
"end": {
"line": 1,
- "column": 54
+ "column": 20
}
},
"program": {
"type": "Program",
"start": 0,
- "end": 54,
+ "end": 20,
"loc": {
"start": {
"line": 1,
@@ -23,7 +23,7 @@
},
"end": {
"line": 1,
- "column": 54
+ "column": 20
}
},
"sourceType": "script",
@@ -31,7 +31,7 @@
{
"type": "ExpressionStatement",
"start": 0,
- "end": 54,
+ "end": 20,
"loc": {
"start": {
"line": 1,
@@ -39,13 +39,13 @@
},
"end": {
"line": 1,
- "column": 54
+ "column": 20
}
},
"expression": {
- "type": "ComprehensionExpression",
+ "type": "CallExpression",
"start": 0,
- "end": 54,
+ "end": 19,
"loc": {
"start": {
"line": 1,
@@ -53,44 +53,75 @@
},
"end": {
"line": 1,
- "column": 54
+ "column": 19
}
},
- "blocks": [
+ "callee": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "f"
+ },
+ "arguments": [
{
- "type": "ComprehensionBlock",
- "start": 1,
- "end": 17,
+ "type": "SpreadElement",
+ "start": 2,
+ "end": 6,
"loc": {
"start": {
"line": 1,
- "column": 1
+ "column": 2
},
"end": {
"line": 1,
- "column": 17
+ "column": 6
}
},
- "left": {
+ "argument": {
"type": "Identifier",
- "start": 6,
- "end": 7,
+ "start": 5,
+ "end": 6,
"loc": {
"start": {
"line": 1,
- "column": 6
+ "column": 5
},
"end": {
"line": 1,
- "column": 7
+ "column": 6
}
},
"name": "x"
+ }
+ },
+ {
+ "type": "SpreadElement",
+ "start": 8,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
},
- "right": {
+ "argument": {
"type": "Identifier",
"start": 11,
- "end": 16,
+ "end": 12,
"loc": {
"start": {
"line": 1,
@@ -98,128 +129,46 @@
},
"end": {
"line": 1,
- "column": 16
- }
- },
- "name": "array"
- }
- },
- {
- "type": "ComprehensionBlock",
- "start": 18,
- "end": 35,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 35
- }
- },
- "left": {
- "type": "Identifier",
- "start": 23,
- "end": 24,
- "loc": {
- "start": {
- "line": 1,
- "column": 23
- },
- "end": {
- "line": 1,
- "column": 24
+ "column": 12
}
},
"name": "y"
+ }
+ },
+ {
+ "type": "SpreadElement",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
},
- "right": {
+ "argument": {
"type": "Identifier",
- "start": 28,
- "end": 34,
+ "start": 17,
+ "end": 18,
"loc": {
"start": {
"line": 1,
- "column": 28
+ "column": 17
},
"end": {
"line": 1,
- "column": 34
+ "column": 18
}
},
- "name": "array2"
+ "name": "z"
}
}
- ],
- "filter": {
- "type": "BinaryExpression",
- "start": 40,
- "end": 50,
- "loc": {
- "start": {
- "line": 1,
- "column": 40
- },
- "end": {
- "line": 1,
- "column": 50
- }
- },
- "left": {
- "type": "Identifier",
- "start": 40,
- "end": 41,
- "loc": {
- "start": {
- "line": 1,
- "column": 40
- },
- "end": {
- "line": 1,
- "column": 41
- }
- },
- "name": "x"
- },
- "operator": "===",
- "right": {
- "type": "Identifier",
- "start": 46,
- "end": 50,
- "loc": {
- "start": {
- "line": 1,
- "column": 46
- },
- "end": {
- "line": 1,
- "column": 50
- }
- },
- "name": "test"
- }
- },
- "body": {
- "type": "Identifier",
- "start": 52,
- "end": 53,
- "loc": {
- "start": {
- "line": 1,
- "column": 52
- },
- "end": {
- "line": 1,
- "column": 53
- }
- },
- "name": "x"
- },
- "generator": true
+ ]
}
}
]
- },
- "comments": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/call-spread-default/actual.js b/test/fixtures/esprima/es2015-spread-element/call-spread-default/actual.js
new file mode 100644
index 0000000000..66837c3c6c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/call-spread-default/actual.js
@@ -0,0 +1 @@
+f(g, ...h = i);
diff --git a/test/fixtures/esprima/es2015-spread-element/call-spread-default/expected.json b/test/fixtures/esprima/es2015-spread-element/call-spread-default/expected.json
new file mode 100644
index 0000000000..dbf33a3d90
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/call-spread-default/expected.json
@@ -0,0 +1,160 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "f"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "g"
+ },
+ {
+ "type": "SpreadElement",
+ "start": 5,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "argument": {
+ "type": "AssignmentExpression",
+ "start": 8,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "h"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "i"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/call-spread-first/actual.js b/test/fixtures/esprima/es2015-spread-element/call-spread-first/actual.js
new file mode 100644
index 0000000000..c6bb9ceba6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/call-spread-first/actual.js
@@ -0,0 +1 @@
+f(...x, y, z);
diff --git a/test/fixtures/esprima/es2015-spread-element/call-spread-first/expected.json b/test/fixtures/esprima/es2015-spread-element/call-spread-first/expected.json
new file mode 100644
index 0000000000..4200d9b278
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/call-spread-first/expected.json
@@ -0,0 +1,144 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "f"
+ },
+ "arguments": [
+ {
+ "type": "SpreadElement",
+ "start": 2,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "x"
+ }
+ },
+ {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "y"
+ },
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "z"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/call-spread-number/actual.js b/test/fixtures/esprima/es2015-spread-element/call-spread-number/actual.js
new file mode 100644
index 0000000000..e97b23f2bc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/call-spread-number/actual.js
@@ -0,0 +1 @@
+f(....5);
diff --git a/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json b/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json
new file mode 100644
index 0000000000..0ec4f48337
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "f"
+ },
+ "arguments": [
+ {
+ "type": "SpreadElement",
+ "start": 2,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "argument": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 0.5,
+ "raw": ".5"
+ },
+ "value": 0.5
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/call-spread/actual.js b/test/fixtures/esprima/es2015-spread-element/call-spread/actual.js
new file mode 100644
index 0000000000..95c689e847
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/call-spread/actual.js
@@ -0,0 +1 @@
+f(...g);
diff --git a/test/fixtures/esprima/es2015-spread-element/call-spread/expected.json b/test/fixtures/esprima/es2015-spread-element/call-spread/expected.json
new file mode 100644
index 0000000000..f85b3967a4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/call-spread/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "f"
+ },
+ "arguments": [
+ {
+ "type": "SpreadElement",
+ "start": 2,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "g"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-call-dot-dot/actual.js b/test/fixtures/esprima/es2015-spread-element/invalid-call-dot-dot/actual.js
new file mode 100644
index 0000000000..893bd180db
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-call-dot-dot/actual.js
@@ -0,0 +1 @@
+f(..g);
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-call-dot-dot/options.json b/test/fixtures/esprima/es2015-spread-element/invalid-call-dot-dot/options.json
new file mode 100644
index 0000000000..e68fbb6aec
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-call-dot-dot/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-call-dots/actual.js b/test/fixtures/esprima/es2015-spread-element/invalid-call-dots/actual.js
new file mode 100644
index 0000000000..70875a2750
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-call-dots/actual.js
@@ -0,0 +1 @@
+f(....g);
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-call-dots/options.json b/test/fixtures/esprima/es2015-spread-element/invalid-call-dots/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-call-dots/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-call-spreads/actual.js b/test/fixtures/esprima/es2015-spread-element/invalid-call-spreads/actual.js
new file mode 100644
index 0000000000..6c046e3528
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-call-spreads/actual.js
@@ -0,0 +1 @@
+f(... ... g);
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-call-spreads/options.json b/test/fixtures/esprima/es2015-spread-element/invalid-call-spreads/options.json
new file mode 100644
index 0000000000..515b971673
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-call-spreads/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:6)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-new-dot-dot/actual.js b/test/fixtures/esprima/es2015-spread-element/invalid-new-dot-dot/actual.js
new file mode 100644
index 0000000000..94f077133c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-new-dot-dot/actual.js
@@ -0,0 +1 @@
+new f(..g);
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-new-dot-dot/options.json b/test/fixtures/esprima/es2015-spread-element/invalid-new-dot-dot/options.json
new file mode 100644
index 0000000000..515b971673
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-new-dot-dot/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:6)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-new-dots/actual.js b/test/fixtures/esprima/es2015-spread-element/invalid-new-dots/actual.js
new file mode 100644
index 0000000000..1078dba79a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-new-dots/actual.js
@@ -0,0 +1 @@
+new f(....g);
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-new-dots/options.json b/test/fixtures/esprima/es2015-spread-element/invalid-new-dots/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-new-dots/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-new-spreads/actual.js b/test/fixtures/esprima/es2015-spread-element/invalid-new-spreads/actual.js
new file mode 100644
index 0000000000..5f6a3034bc
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-new-spreads/actual.js
@@ -0,0 +1 @@
+new f(... ... g);
diff --git a/test/fixtures/esprima/es2015-spread-element/invalid-new-spreads/options.json b/test/fixtures/esprima/es2015-spread-element/invalid-new-spreads/options.json
new file mode 100644
index 0000000000..328b1ddde8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/invalid-new-spreads/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/new-multi-spread/actual.js b/test/fixtures/esprima/es2015-spread-element/new-multi-spread/actual.js
new file mode 100644
index 0000000000..afb519abca
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/new-multi-spread/actual.js
@@ -0,0 +1 @@
+new f(...x, ...y, ...z);
diff --git a/test/fixtures/harmony/uncategorised/58/expected.json b/test/fixtures/esprima/es2015-spread-element/new-multi-spread/expected.json
similarity index 51%
rename from test/fixtures/harmony/uncategorised/58/expected.json
rename to test/fixtures/esprima/es2015-spread-element/new-multi-spread/expected.json
index 26450dfeb4..8a3987d6e0 100644
--- a/test/fixtures/harmony/uncategorised/58/expected.json
+++ b/test/fixtures/esprima/es2015-spread-element/new-multi-spread/expected.json
@@ -1,7 +1,7 @@
{
"type": "File",
"start": 0,
- "end": 54,
+ "end": 24,
"loc": {
"start": {
"line": 1,
@@ -9,13 +9,13 @@
},
"end": {
"line": 1,
- "column": 54
+ "column": 24
}
},
"program": {
"type": "Program",
"start": 0,
- "end": 54,
+ "end": 24,
"loc": {
"start": {
"line": 1,
@@ -23,7 +23,7 @@
},
"end": {
"line": 1,
- "column": 54
+ "column": 24
}
},
"sourceType": "script",
@@ -31,7 +31,7 @@
{
"type": "ExpressionStatement",
"start": 0,
- "end": 54,
+ "end": 24,
"loc": {
"start": {
"line": 1,
@@ -39,13 +39,13 @@
},
"end": {
"line": 1,
- "column": 54
+ "column": 24
}
},
"expression": {
- "type": "ComprehensionExpression",
+ "type": "NewExpression",
"start": 0,
- "end": 54,
+ "end": 23,
"loc": {
"start": {
"line": 1,
@@ -53,61 +53,92 @@
},
"end": {
"line": 1,
- "column": 54
+ "column": 23
}
},
- "blocks": [
+ "callee": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "f"
+ },
+ "arguments": [
{
- "type": "ComprehensionBlock",
- "start": 1,
- "end": 17,
+ "type": "SpreadElement",
+ "start": 6,
+ "end": 10,
"loc": {
"start": {
"line": 1,
- "column": 1
+ "column": 6
},
"end": {
"line": 1,
- "column": 17
+ "column": 10
}
},
- "left": {
+ "argument": {
"type": "Identifier",
- "start": 6,
- "end": 7,
+ "start": 9,
+ "end": 10,
"loc": {
"start": {
"line": 1,
- "column": 6
+ "column": 9
},
"end": {
"line": 1,
- "column": 7
+ "column": 10
}
},
"name": "x"
+ }
+ },
+ {
+ "type": "SpreadElement",
+ "start": 12,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
},
- "right": {
+ "argument": {
"type": "Identifier",
- "start": 11,
+ "start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
- "column": 11
+ "column": 15
},
"end": {
"line": 1,
"column": 16
}
},
- "name": "array"
+ "name": "y"
}
},
{
- "type": "ComprehensionBlock",
+ "type": "SpreadElement",
"start": 18,
- "end": 35,
+ "end": 22,
"loc": {
"start": {
"line": 1,
@@ -115,111 +146,29 @@
},
"end": {
"line": 1,
- "column": 35
+ "column": 22
}
},
- "left": {
+ "argument": {
"type": "Identifier",
- "start": 23,
- "end": 24,
+ "start": 21,
+ "end": 22,
"loc": {
"start": {
"line": 1,
- "column": 23
+ "column": 21
},
"end": {
"line": 1,
- "column": 24
+ "column": 22
}
},
- "name": "y"
- },
- "right": {
- "type": "Identifier",
- "start": 28,
- "end": 34,
- "loc": {
- "start": {
- "line": 1,
- "column": 28
- },
- "end": {
- "line": 1,
- "column": 34
- }
- },
- "name": "array2"
+ "name": "z"
}
}
- ],
- "filter": {
- "type": "BinaryExpression",
- "start": 40,
- "end": 50,
- "loc": {
- "start": {
- "line": 1,
- "column": 40
- },
- "end": {
- "line": 1,
- "column": 50
- }
- },
- "left": {
- "type": "Identifier",
- "start": 40,
- "end": 41,
- "loc": {
- "start": {
- "line": 1,
- "column": 40
- },
- "end": {
- "line": 1,
- "column": 41
- }
- },
- "name": "x"
- },
- "operator": "===",
- "right": {
- "type": "Identifier",
- "start": 46,
- "end": 50,
- "loc": {
- "start": {
- "line": 1,
- "column": 46
- },
- "end": {
- "line": 1,
- "column": 50
- }
- },
- "name": "test"
- }
- },
- "body": {
- "type": "Identifier",
- "start": 52,
- "end": 53,
- "loc": {
- "start": {
- "line": 1,
- "column": 52
- },
- "end": {
- "line": 1,
- "column": 53
- }
- },
- "name": "x"
- },
- "generator": false
+ ]
}
}
]
- },
- "comments": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/new-spread-default/actual.js b/test/fixtures/esprima/es2015-spread-element/new-spread-default/actual.js
new file mode 100644
index 0000000000..a379e559f4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/new-spread-default/actual.js
@@ -0,0 +1 @@
+new f(g, ...h = i);
diff --git a/test/fixtures/esprima/es2015-spread-element/new-spread-default/expected.json b/test/fixtures/esprima/es2015-spread-element/new-spread-default/expected.json
new file mode 100644
index 0000000000..79688da6aa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/new-spread-default/expected.json
@@ -0,0 +1,160 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "f"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "g"
+ },
+ {
+ "type": "SpreadElement",
+ "start": 9,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "argument": {
+ "type": "AssignmentExpression",
+ "start": 12,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "h"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "i"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/new-spread-first/actual.js b/test/fixtures/esprima/es2015-spread-element/new-spread-first/actual.js
new file mode 100644
index 0000000000..359da277a9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/new-spread-first/actual.js
@@ -0,0 +1 @@
+new f(...x, y, z);
diff --git a/test/fixtures/esprima/es2015-spread-element/new-spread-first/expected.json b/test/fixtures/esprima/es2015-spread-element/new-spread-first/expected.json
new file mode 100644
index 0000000000..7075fa833c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/new-spread-first/expected.json
@@ -0,0 +1,144 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "f"
+ },
+ "arguments": [
+ {
+ "type": "SpreadElement",
+ "start": 6,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "x"
+ }
+ },
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "y"
+ },
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "z"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/new-spread-number/actual.js b/test/fixtures/esprima/es2015-spread-element/new-spread-number/actual.js
new file mode 100644
index 0000000000..3c55719805
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/new-spread-number/actual.js
@@ -0,0 +1 @@
+new f(....5);
diff --git a/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json b/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json
new file mode 100644
index 0000000000..5022e9d8b6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "f"
+ },
+ "arguments": [
+ {
+ "type": "SpreadElement",
+ "start": 6,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "argument": {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "extra": {
+ "rawValue": 0.5,
+ "raw": ".5"
+ },
+ "value": 0.5
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-spread-element/new-spread/actual.js b/test/fixtures/esprima/es2015-spread-element/new-spread/actual.js
new file mode 100644
index 0000000000..316f810403
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/new-spread/actual.js
@@ -0,0 +1 @@
+new f(...g);
diff --git a/test/fixtures/esprima/es2015-spread-element/new-spread/expected.json b/test/fixtures/esprima/es2015-spread-element/new-spread/expected.json
new file mode 100644
index 0000000000..a5a4974201
--- /dev/null
+++ b/test/fixtures/esprima/es2015-spread-element/new-spread/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "f"
+ },
+ "arguments": [
+ {
+ "type": "SpreadElement",
+ "start": 6,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "g"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-super-property/.invalid_super_access/actual.js b/test/fixtures/esprima/es2015-super-property/.invalid_super_access/actual.js
new file mode 100644
index 0000000000..ddff2f376c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/.invalid_super_access/actual.js
@@ -0,0 +1,5 @@
+class A extends B {
+ constructor() {
+ (super)();
+ }
+}
diff --git a/test/fixtures/esprima/es2015-super-property/.invalid_super_access/options.json b/test/fixtures/esprima/es2015-super-property/.invalid_super_access/options.json
new file mode 100644
index 0000000000..2c472e02d3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/.invalid_super_access/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected super (3:14)"
+}
diff --git a/test/fixtures/esprima/es2015-super-property/.invalid_super_id/actual.js b/test/fixtures/esprima/es2015-super-property/.invalid_super_id/actual.js
new file mode 100644
index 0000000000..bf4f139b2b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/.invalid_super_id/actual.js
@@ -0,0 +1,3 @@
+class A {
+ foo() { new super + 3 }
+}
diff --git a/test/fixtures/esprima/es2015-super-property/.invalid_super_id/expected.json b/test/fixtures/esprima/es2015-super-property/.invalid_super_id/expected.json
new file mode 100644
index 0000000000..051ec3a5b8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/.invalid_super_id/expected.json
@@ -0,0 +1,232 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 14,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 27
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "static": false,
+ "kind": "method",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 17,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 27
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 27
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 22,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "left": {
+ "type": "NewExpression",
+ "start": 22,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "callee": {
+ "type": "Super",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 16
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "arguments": []
+ },
+ "operator": "+",
+ "right": {
+ "type": "Literal",
+ "start": 34,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 24
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "value": 3,
+ "rawValue": 3,
+ "raw": "3"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-super-property/.invalid_super_id/options.json b/test/fixtures/esprima/es2015-super-property/.invalid_super_id/options.json
new file mode 100644
index 0000000000..2479ccfd69
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/.invalid_super_id/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected super (2:16)"
+}
diff --git a/test/fixtures/esprima/es2015-super-property/arrow_super/actual.js b/test/fixtures/esprima/es2015-super-property/arrow_super/actual.js
new file mode 100644
index 0000000000..016e8d4d7f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/arrow_super/actual.js
@@ -0,0 +1,5 @@
+class A extends B {
+ constructor() {
+ () => super()
+ }
+}
diff --git a/test/fixtures/esprima/es2015-super-property/arrow_super/expected.json b/test/fixtures/esprima/es2015-super-property/arrow_super/expected.json
new file mode 100644
index 0000000000..76dcbec057
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/arrow_super/expected.json
@@ -0,0 +1,219 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 69,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 69,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 69,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "B"
+ },
+ "body": {
+ "type": "ClassBody",
+ "start": 18,
+ "end": 69,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 24,
+ "end": 67,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "name": "constructor"
+ },
+ "static": false,
+ "kind": "constructor",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 38,
+ "end": 67,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 18
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 48,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 48,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [],
+ "body": {
+ "type": "CallExpression",
+ "start": 54,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 14
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "callee": {
+ "type": "Super",
+ "start": 54,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 14
+ },
+ "end": {
+ "line": 3,
+ "column": 19
+ }
+ }
+ },
+ "arguments": []
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-super-property/constructor_super/actual.js b/test/fixtures/esprima/es2015-super-property/constructor_super/actual.js
new file mode 100644
index 0000000000..ed6fbc8212
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/constructor_super/actual.js
@@ -0,0 +1,5 @@
+class A extends B {
+ constructor() {
+ super();
+ }
+}
diff --git a/test/fixtures/esprima/es2015-super-property/constructor_super/expected.json b/test/fixtures/esprima/es2015-super-property/constructor_super/expected.json
new file mode 100644
index 0000000000..aad408ba61
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/constructor_super/expected.json
@@ -0,0 +1,200 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "B"
+ },
+ "body": {
+ "type": "ClassBody",
+ "start": 18,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 24,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "name": "constructor"
+ },
+ "static": false,
+ "kind": "constructor",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 38,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 18
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 48,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 48,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 15
+ }
+ },
+ "callee": {
+ "type": "Super",
+ "start": 48,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ }
+ },
+ "arguments": []
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-super-property/invalid_super_not_inside_function/actual.js b/test/fixtures/esprima/es2015-super-property/invalid_super_not_inside_function/actual.js
new file mode 100644
index 0000000000..37fcf41ca3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/invalid_super_not_inside_function/actual.js
@@ -0,0 +1 @@
+var x = super();
diff --git a/test/fixtures/esprima/es2015-super-property/invalid_super_not_inside_function/options.json b/test/fixtures/esprima/es2015-super-property/invalid_super_not_inside_function/options.json
new file mode 100644
index 0000000000..1518a5e3fe
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/invalid_super_not_inside_function/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "'super' outside of function or class (1:8)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-super-property/new_super/actual.js b/test/fixtures/esprima/es2015-super-property/new_super/actual.js
new file mode 100644
index 0000000000..ec0be4ed6a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/new_super/actual.js
@@ -0,0 +1,5 @@
+class A extends B {
+ foo() {
+ new super.bar()
+ }
+}
diff --git a/test/fixtures/esprima/es2015-super-property/new_super/expected.json b/test/fixtures/esprima/es2015-super-property/new_super/expected.json
new file mode 100644
index 0000000000..4bf3b459c2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/new_super/expected.json
@@ -0,0 +1,232 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "B"
+ },
+ "body": {
+ "type": "ClassBody",
+ "start": 18,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 24,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 30,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 40,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 40,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 23
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 44,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 12
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "object": {
+ "type": "Super",
+ "start": 44,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 12
+ },
+ "end": {
+ "line": 3,
+ "column": 17
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 50,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 18
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "name": "bar"
+ },
+ "computed": false
+ },
+ "arguments": []
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-super-property/super_computed/actual.js b/test/fixtures/esprima/es2015-super-property/super_computed/actual.js
new file mode 100644
index 0000000000..02b6d22d2f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/super_computed/actual.js
@@ -0,0 +1,5 @@
+class A extends B {
+ X() {
+ return super[1]
+ }
+}
diff --git a/test/fixtures/esprima/es2015-super-property/super_computed/expected.json b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json
new file mode 100644
index 0000000000..0187540a76
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json
@@ -0,0 +1,220 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "B"
+ },
+ "body": {
+ "type": "ClassBody",
+ "start": 18,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 24,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "name": "X"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 28,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 38,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 23
+ }
+ },
+ "argument": {
+ "type": "MemberExpression",
+ "start": 45,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 3,
+ "column": 23
+ }
+ },
+ "object": {
+ "type": "Super",
+ "start": 45,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 3,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "NumberLiteral",
+ "start": 51,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ },
+ "computed": true
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-super-property/super_member/actual.js b/test/fixtures/esprima/es2015-super-property/super_member/actual.js
new file mode 100644
index 0000000000..28e4ea0e62
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/super_member/actual.js
@@ -0,0 +1,5 @@
+class A extends B {
+ X() {
+ return super.y
+ }
+}
diff --git a/test/fixtures/esprima/es2015-super-property/super_member/expected.json b/test/fixtures/esprima/es2015-super-property/super_member/expected.json
new file mode 100644
index 0000000000..9b939e582b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-super-property/super_member/expected.json
@@ -0,0 +1,216 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "B"
+ },
+ "body": {
+ "type": "ClassBody",
+ "start": 18,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 24,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 5
+ }
+ },
+ "name": "X"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 28,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 4,
+ "column": 5
+ }
+ },
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 38,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "argument": {
+ "type": "MemberExpression",
+ "start": 45,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "object": {
+ "type": "Super",
+ "start": 45,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 3,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 51,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "name": "y"
+ },
+ "computed": false
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/.octal-literal/actual.js b/test/fixtures/esprima/es2015-template-literals/.octal-literal/actual.js
new file mode 100644
index 0000000000..84db0a12ca
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/.octal-literal/actual.js
@@ -0,0 +1 @@
+`\00`;
diff --git a/test/fixtures/esprima/es2015-template-literals/.octal-literal/expected.json b/test/fixtures/esprima/es2015-template-literals/.octal-literal/expected.json
new file mode 100644
index 0000000000..9ebd9cc590
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/.octal-literal/expected.json
@@ -0,0 +1,86 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "TemplateLiteral",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expressions": [],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 1,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "value": {
+ "raw": "\\00",
+ "cooked": "\u0000"
+ },
+ "tail": true
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/.octal-literal/options.json b/test/fixtures/esprima/es2015-template-literals/.octal-literal/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/.octal-literal/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/actual.js b/test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/actual.js
new file mode 100644
index 0000000000..b3c8c9645f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/actual.js
@@ -0,0 +1 @@
+'use strict'; `\00`;
diff --git a/test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/expected.json b/test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/expected.json
new file mode 100644
index 0000000000..7ffc243c53
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/expected.json
@@ -0,0 +1,119 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "expression": {
+ "type": "TemplateLiteral",
+ "start": 14,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "expressions": [],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "value": {
+ "raw": "\\00",
+ "cooked": "\u0000"
+ },
+ "tail": true
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/options.json b/test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/options.json
new file mode 100644
index 0000000000..51c483f3d3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/after-switch/actual.js b/test/fixtures/esprima/es2015-template-literals/after-switch/actual.js
new file mode 100644
index 0000000000..951b889322
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/after-switch/actual.js
@@ -0,0 +1 @@
+switch `test`
diff --git a/test/fixtures/esprima/es2015-template-literals/after-switch/options.json b/test/fixtures/esprima/es2015-template-literals/after-switch/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/after-switch/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/dollar-sign/actual.js b/test/fixtures/esprima/es2015-template-literals/dollar-sign/actual.js
new file mode 100644
index 0000000000..ecfd22dd77
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/dollar-sign/actual.js
@@ -0,0 +1 @@
+`$`
diff --git a/test/fixtures/esprima/es2015-template-literals/dollar-sign/expected.json b/test/fixtures/esprima/es2015-template-literals/dollar-sign/expected.json
new file mode 100644
index 0000000000..094ec18811
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/dollar-sign/expected.json
@@ -0,0 +1,86 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "TemplateLiteral",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expressions": [],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "value": {
+ "raw": "$",
+ "cooked": "$"
+ },
+ "tail": true
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/escape-sequences/actual.js b/test/fixtures/esprima/es2015-template-literals/escape-sequences/actual.js
new file mode 100644
index 0000000000..2f6bc5fc68
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/escape-sequences/actual.js
@@ -0,0 +1 @@
+var source = '`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`';
diff --git a/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json b/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json
new file mode 100644
index 0000000000..3afaacea6e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "StringLiteral",
+ "start": 13,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "extra": {
+ "rawValue": "`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`",
+ "raw": "'`\\\\n\\\\r\\\\b\\\\v\\\\t\\\\f\\\\\\n\\\\\\r\\n`'"
+ },
+ "value": "`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/invalid-escape/actual.js b/test/fixtures/esprima/es2015-template-literals/invalid-escape/actual.js
new file mode 100644
index 0000000000..8d9106f9c8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/invalid-escape/actual.js
@@ -0,0 +1 @@
+`\1`;
diff --git a/test/fixtures/esprima/es2015-template-literals/invalid-escape/options.json b/test/fixtures/esprima/es2015-template-literals/invalid-escape/options.json
new file mode 100644
index 0000000000..857b44ba21
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/invalid-escape/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Octal literal in strict mode (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/line-terminators/actual.js b/test/fixtures/esprima/es2015-template-literals/line-terminators/actual.js
new file mode 100644
index 0000000000..c5468af67d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/line-terminators/actual.js
@@ -0,0 +1 @@
+var source = '`\n\r\n`';
diff --git a/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json b/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json
new file mode 100644
index 0000000000..836d521625
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "StringLiteral",
+ "start": 13,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "extra": {
+ "rawValue": "`\n\r\n`",
+ "raw": "'`\\n\\r\\n`'"
+ },
+ "value": "`\n\r\n`"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/actual.js b/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/actual.js
new file mode 100644
index 0000000000..f8f6e9a34e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/actual.js
@@ -0,0 +1 @@
+var source = '`\\u{000042}\\u0042\\x42\\u0\\A\\0`';
diff --git a/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json b/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json
new file mode 100644
index 0000000000..1a1ed2bb2a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "StringLiteral",
+ "start": 13,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "extra": {
+ "rawValue": "`\\u{000042}\\u0042\\x42\\u0\\A\\0`",
+ "raw": "'`\\\\u{000042}\\\\u0042\\\\x42\\\\u0\\\\A\\\\0`'"
+ },
+ "value": "`\\u{000042}\\u0042\\x42\\u0\\A\\0`"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/new-expression/actual.js b/test/fixtures/esprima/es2015-template-literals/new-expression/actual.js
new file mode 100644
index 0000000000..0309ceb6c1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/new-expression/actual.js
@@ -0,0 +1 @@
+new raw`42`
diff --git a/test/fixtures/esprima/es2015-template-literals/new-expression/expected.json b/test/fixtures/esprima/es2015-template-literals/new-expression/expected.json
new file mode 100644
index 0000000000..08da84c059
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/new-expression/expected.json
@@ -0,0 +1,133 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "callee": {
+ "type": "TaggedTemplateExpression",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "tag": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "raw"
+ },
+ "quasi": {
+ "type": "TemplateLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expressions": [],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 8,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": {
+ "raw": "42",
+ "cooked": "42"
+ },
+ "tail": true
+ }
+ ]
+ }
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/tagged-interpolation/actual.js b/test/fixtures/esprima/es2015-template-literals/tagged-interpolation/actual.js
new file mode 100644
index 0000000000..eb544f2df4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/tagged-interpolation/actual.js
@@ -0,0 +1 @@
+raw`hello ${name}`
diff --git a/test/fixtures/esprima/es2015-template-literals/tagged-interpolation/expected.json b/test/fixtures/esprima/es2015-template-literals/tagged-interpolation/expected.json
new file mode 100644
index 0000000000..1308a48aaa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/tagged-interpolation/expected.json
@@ -0,0 +1,154 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "expression": {
+ "type": "TaggedTemplateExpression",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "tag": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "raw"
+ },
+ "quasi": {
+ "type": "TemplateLiteral",
+ "start": 3,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "expressions": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "name"
+ }
+ ],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": {
+ "raw": "hello ",
+ "cooked": "hello "
+ },
+ "tail": false
+ },
+ {
+ "type": "TemplateElement",
+ "start": 17,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "value": {
+ "raw": "",
+ "cooked": ""
+ },
+ "tail": true
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/tagged-nested-with-object-literal/actual.js b/test/fixtures/esprima/es2015-template-literals/tagged-nested-with-object-literal/actual.js
new file mode 100644
index 0000000000..9e7b600b59
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/tagged-nested-with-object-literal/actual.js
@@ -0,0 +1 @@
+raw`token ${`nested ${`deeply` + {}} blah`}`
diff --git a/test/fixtures/esprima/es2015-template-literals/tagged-nested-with-object-literal/expected.json b/test/fixtures/esprima/es2015-template-literals/tagged-nested-with-object-literal/expected.json
new file mode 100644
index 0000000000..dd145facf5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/tagged-nested-with-object-literal/expected.json
@@ -0,0 +1,267 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "TaggedTemplateExpression",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "tag": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "raw"
+ },
+ "quasi": {
+ "type": "TemplateLiteral",
+ "start": 3,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expressions": [
+ {
+ "type": "TemplateLiteral",
+ "start": 12,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "expressions": [
+ {
+ "type": "BinaryExpression",
+ "start": 22,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "left": {
+ "type": "TemplateLiteral",
+ "start": 22,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "expressions": [],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 23,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": {
+ "raw": "deeply",
+ "cooked": "deeply"
+ },
+ "tail": true
+ }
+ ]
+ },
+ "operator": "+",
+ "right": {
+ "type": "ObjectExpression",
+ "start": 33,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "properties": []
+ }
+ }
+ ],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 13,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "value": {
+ "raw": "nested ",
+ "cooked": "nested "
+ },
+ "tail": false
+ },
+ {
+ "type": "TemplateElement",
+ "start": 36,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "value": {
+ "raw": " blah",
+ "cooked": " blah"
+ },
+ "tail": true
+ }
+ ]
+ }
+ ],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": {
+ "raw": "token ",
+ "cooked": "token "
+ },
+ "tail": false
+ },
+ {
+ "type": "TemplateElement",
+ "start": 43,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 43
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "value": {
+ "raw": "",
+ "cooked": ""
+ },
+ "tail": true
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/tagged/actual.js b/test/fixtures/esprima/es2015-template-literals/tagged/actual.js
new file mode 100644
index 0000000000..756b976d06
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/tagged/actual.js
@@ -0,0 +1 @@
+raw`42`
diff --git a/test/fixtures/esprima/es2015-template-literals/tagged/expected.json b/test/fixtures/esprima/es2015-template-literals/tagged/expected.json
new file mode 100644
index 0000000000..3eabcd73c8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/tagged/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "TaggedTemplateExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "tag": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "raw"
+ },
+ "quasi": {
+ "type": "TemplateLiteral",
+ "start": 3,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expressions": [],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "value": {
+ "raw": "42",
+ "cooked": "42"
+ },
+ "tail": true
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/actual.js b/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/actual.js
new file mode 100644
index 0000000000..1847ed1bd5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/actual.js
@@ -0,0 +1 @@
+`hello ${10;test`
diff --git a/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/options.json b/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/options.json
new file mode 100644
index 0000000000..3e33f7730f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/unclosed-nested/actual.js b/test/fixtures/esprima/es2015-template-literals/unclosed-nested/actual.js
new file mode 100644
index 0000000000..4bcb8f1efd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/unclosed-nested/actual.js
@@ -0,0 +1 @@
+`hello ${10 `test`
diff --git a/test/fixtures/esprima/es2015-template-literals/unclosed-nested/options.json b/test/fixtures/esprima/es2015-template-literals/unclosed-nested/options.json
new file mode 100644
index 0000000000..2a73699bc2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/unclosed-nested/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/unclosed/actual.js b/test/fixtures/esprima/es2015-template-literals/unclosed/actual.js
new file mode 100644
index 0000000000..4885e202ae
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/unclosed/actual.js
@@ -0,0 +1 @@
+`test
diff --git a/test/fixtures/esprima/es2015-template-literals/unclosed/options.json b/test/fixtures/esprima/es2015-template-literals/unclosed/options.json
new file mode 100644
index 0000000000..182d155159
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/unclosed/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated template (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-template-literals/untagged/actual.js b/test/fixtures/esprima/es2015-template-literals/untagged/actual.js
new file mode 100644
index 0000000000..e1b8fa68e9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/untagged/actual.js
@@ -0,0 +1 @@
+`42`
diff --git a/test/fixtures/esprima/es2015-template-literals/untagged/expected.json b/test/fixtures/esprima/es2015-template-literals/untagged/expected.json
new file mode 100644
index 0000000000..f0f8b0bf3c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-template-literals/untagged/expected.json
@@ -0,0 +1,86 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "expression": {
+ "type": "TemplateLiteral",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "expressions": [],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 1,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "value": {
+ "raw": "42",
+ "cooked": "42"
+ },
+ "tail": true
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/actual.js b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/actual.js
new file mode 100644
index 0000000000..1d5ecf6f7c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/actual.js
@@ -0,0 +1 @@
+var source = '"\\u{714E}\\u{8336}"';
diff --git a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json
new file mode 100644
index 0000000000..c6f9f2ce0e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "StringLiteral",
+ "start": 13,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "extra": {
+ "rawValue": "\"\\u{714E}\\u{8336}\"",
+ "raw": "'\"\\\\u{714E}\\\\u{8336}\"'"
+ },
+ "value": "\"\\u{714E}\\u{8336}\""
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/actual.js b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/actual.js
new file mode 100644
index 0000000000..fd2a94179a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/actual.js
@@ -0,0 +1 @@
+var source = '"\\u{20BB7}\\u{91CE}\\u{5BB6}"';
diff --git a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json
new file mode 100644
index 0000000000..5c97440415
--- /dev/null
+++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "StringLiteral",
+ "start": 13,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "extra": {
+ "rawValue": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"",
+ "raw": "'\"\\\\u{20BB7}\\\\u{91CE}\\\\u{5BB6}\"'"
+ },
+ "value": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\""
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/actual.js b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/actual.js
new file mode 100644
index 0000000000..582b9f3ab9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/actual.js
@@ -0,0 +1 @@
+var source = '"\\u{00000000034}"';
diff --git a/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json
new file mode 100644
index 0000000000..05e4851182
--- /dev/null
+++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "StringLiteral",
+ "start": 13,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "extra": {
+ "rawValue": "\"\\u{00000000034}\"",
+ "raw": "'\"\\\\u{00000000034}\"'"
+ },
+ "value": "\"\\u{00000000034}\""
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/actual.js b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/actual.js
new file mode 100644
index 0000000000..88b9947a8a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/actual.js
@@ -0,0 +1 @@
+function* g() { (x = yield 42) => {} }
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/expected.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/expected.json
new file mode 100644
index 0000000000..dd6a552b65
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/expected.json
@@ -0,0 +1,200 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 16,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 16,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 17,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "YieldExpression",
+ "start": 21,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "delegate": false,
+ "argument": {
+ "type": "Literal",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 34,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/options.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/options.json
new file mode 100644
index 0000000000..cbc444ce90
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:32)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/actual.js b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/actual.js
new file mode 100644
index 0000000000..0fdfd886f2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/actual.js
@@ -0,0 +1 @@
+(function*yield(){})
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/expected.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/expected.json
new file mode 100644
index 0000000000..608a26d547
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/expected.json
@@ -0,0 +1,99 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "yield"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": []
+ },
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/options.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/options.json
new file mode 100644
index 0000000000..328b1ddde8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/actual.js b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/actual.js
new file mode 100644
index 0000000000..d36903158a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/actual.js
@@ -0,0 +1 @@
+(function *(yield){})
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/expected.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/expected.json
new file mode 100644
index 0000000000..df826e036e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "yield"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": []
+ },
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/options.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/actual.js b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/actual.js
new file mode 100644
index 0000000000..1982701745
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/actual.js
@@ -0,0 +1 @@
+(function *(x, ...yield){})
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/expected.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/expected.json
new file mode 100644
index 0000000000..e99f09b954
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/expected.json
@@ -0,0 +1,132 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "x"
+ },
+ {
+ "type": "RestElement",
+ "start": 15,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "yield"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 24,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "body": []
+ },
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/options.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/options.json
new file mode 100644
index 0000000000..2a73699bc2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/actual.js b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/actual.js
new file mode 100644
index 0000000000..572f574f1f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/actual.js
@@ -0,0 +1 @@
+function *g(yield){}
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/expected.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/expected.json
new file mode 100644
index 0000000000..a5588e4e19
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "yield"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/options.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/actual.js b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/actual.js
new file mode 100644
index 0000000000..7a23544ebd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/actual.js
@@ -0,0 +1 @@
+function *g(a, b, c, ...yield){}
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/expected.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/expected.json
new file mode 100644
index 0000000000..eb042938fb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/expected.json
@@ -0,0 +1,163 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "b"
+ },
+ {
+ "type": "Identifier",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "c"
+ },
+ {
+ "type": "RestElement",
+ "start": 21,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "yield"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 30,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/options.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/options.json
new file mode 100644
index 0000000000..0c5f4deed6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:24)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/actual.js b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/actual.js
new file mode 100644
index 0000000000..71fa5c54c7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/actual.js
@@ -0,0 +1 @@
+"use strict"; ([yield] = x)
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/expected.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/expected.json
new file mode 100644
index 0000000000..9f91e65aeb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 15,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ArrayPattern",
+ "start": 15,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 16,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "yield"
+ }
+ ]
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "name": "x"
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/options.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/options.json
new file mode 100644
index 0000000000..8fee4a64fa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to yield in strict mode (1:16)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/actual.js b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/actual.js
new file mode 100644
index 0000000000..f1e4209b9b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/actual.js
@@ -0,0 +1 @@
+"use strict"; (x = yield) => {}
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/expected.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/expected.json
new file mode 100644
index 0000000000..cab8ff9322
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/expected.json
@@ -0,0 +1,164 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 15,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "yield"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 29,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/options.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/options.json
new file mode 100644
index 0000000000..aca079ee39
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:20)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/actual.js b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/actual.js
new file mode 100644
index 0000000000..f24afff7d9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/actual.js
@@ -0,0 +1 @@
+"use strict"; (yield) => 42
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/expected.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/expected.json
new file mode 100644
index 0000000000..3a47f7de3a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "yield"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 25,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/options.json b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/options.json
new file mode 100644
index 0000000000..c72d3f77b2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding yield in strict mode (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.yield-generator-arrow-concise-body/actual.js b/test/fixtures/esprima/es2015-yield/.yield-generator-arrow-concise-body/actual.js
new file mode 100644
index 0000000000..9d1bde8dd6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.yield-generator-arrow-concise-body/actual.js
@@ -0,0 +1 @@
+function *g() { (x) => x * yield; }
diff --git a/test/fixtures/esprima/es2015-yield/.yield-generator-arrow-concise-body/expected.json b/test/fixtures/esprima/es2015-yield/.yield-generator-arrow-concise-body/expected.json
new file mode 100644
index 0000000000..4887c0fc44
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.yield-generator-arrow-concise-body/expected.json
@@ -0,0 +1,183 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 16,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 16,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "BinaryExpression",
+ "start": 23,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "x"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "name": "yield"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/.yield-generator-function-expression/actual.js b/test/fixtures/esprima/es2015-yield/.yield-generator-function-expression/actual.js
new file mode 100644
index 0000000000..be9d93e137
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.yield-generator-function-expression/actual.js
@@ -0,0 +1 @@
+function *g(){ var y = function yield(){}; }
diff --git a/test/fixtures/esprima/es2015-yield/.yield-generator-function-parameter/actual.js b/test/fixtures/esprima/es2015-yield/.yield-generator-function-parameter/actual.js
new file mode 100644
index 0000000000..95cb17aad9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.yield-generator-function-parameter/actual.js
@@ -0,0 +1 @@
+function *g() { var z = function(yield) {} }
diff --git a/test/fixtures/esprima/es2015-yield/.yield-generator-function-parameter/expected.json b/test/fixtures/esprima/es2015-yield/.yield-generator-function-parameter/expected.json
new file mode 100644
index 0000000000..e8b2f8224a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/.yield-generator-function-parameter/expected.json
@@ -0,0 +1,185 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 16,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 20,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "z"
+ },
+ "init": {
+ "type": "FunctionExpression",
+ "start": 24,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 33,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "name": "yield"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 40,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/actual.js
new file mode 100644
index 0000000000..e6d7b0640a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/actual.js
@@ -0,0 +1 @@
+var {x: y = yield 3} = z;
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/options.json
new file mode 100644
index 0000000000..2a73699bc2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-expression/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-expression/actual.js
new file mode 100644
index 0000000000..e88270d51d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-expression/actual.js
@@ -0,0 +1 @@
+(function() { yield 3; })
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-expression/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-expression/options.json
new file mode 100644
index 0000000000..aca079ee39
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-expression/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:20)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/actual.js
new file mode 100644
index 0000000000..974d4e4b49
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/actual.js
@@ -0,0 +1 @@
+function *g(){ (yield) => 42 }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/options.json
new file mode 100644
index 0000000000..b7fab4d126
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:16)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/actual.js
new file mode 100644
index 0000000000..e9aafb3633
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/actual.js
@@ -0,0 +1 @@
+function *g(){ (a, b, c, yield) => 42 }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/options.json
new file mode 100644
index 0000000000..b38eacd757
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:25)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/actual.js
new file mode 100644
index 0000000000..f2891b80cd
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/actual.js
@@ -0,0 +1 @@
+function *g() { try {} catch (yield) {} }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/expected.json
new file mode 100644
index 0000000000..53cf8c221f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/expected.json
@@ -0,0 +1,164 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 16,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 23,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 30,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "name": "yield"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 37,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/options.json
new file mode 100644
index 0000000000..7b7329bb7e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:30)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-declaration/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-declaration/actual.js
new file mode 100644
index 0000000000..8093fc9b88
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-declaration/actual.js
@@ -0,0 +1 @@
+function *g() { function *yield(){} }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-declaration/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-declaration/options.json
new file mode 100644
index 0000000000..00b62a33f8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-declaration/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:26)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/actual.js
new file mode 100644
index 0000000000..e925fcfee9
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/actual.js
@@ -0,0 +1 @@
+export default function *yield() {}
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json
new file mode 100644
index 0000000000..53ee186d1b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "'import' and 'export' may appear only with 'sourceType: module' (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-function-declaration/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-function-declaration/actual.js
new file mode 100644
index 0000000000..45ef943364
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-function-declaration/actual.js
@@ -0,0 +1 @@
+function *g() { function yield() {} }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-function-declaration/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-function-declaration/options.json
new file mode 100644
index 0000000000..b242442b4c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-function-declaration/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:25)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-lexical-declaration/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-lexical-declaration/actual.js
new file mode 100644
index 0000000000..c977c7c980
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-lexical-declaration/actual.js
@@ -0,0 +1 @@
+function *g() { let yield; }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-lexical-declaration/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-lexical-declaration/options.json
new file mode 100644
index 0000000000..aca079ee39
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-lexical-declaration/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:20)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/actual.js
new file mode 100644
index 0000000000..6d4eb10367
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/actual.js
@@ -0,0 +1 @@
+function *g() { return yield.x; }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/options.json
new file mode 100644
index 0000000000..f55830c1c3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:28)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/actual.js
new file mode 100644
index 0000000000..980df04f8d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/actual.js
@@ -0,0 +1 @@
+"use strict"; function *g(){ var y = function yield(){}; }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/options.json
new file mode 100644
index 0000000000..d34690fa60
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:46)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/actual.js
new file mode 100644
index 0000000000..ed19c76d04
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/actual.js
@@ -0,0 +1 @@
+"use strict"; function *g() { var z = function(yield) {} }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/options.json
new file mode 100644
index 0000000000..c9ba88af97
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:47)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/actual.js
new file mode 100644
index 0000000000..786e859b64
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/actual.js
@@ -0,0 +1 @@
+function *g() { var yield; }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/expected.json
new file mode 100644
index 0000000000..a4876b5487
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 16,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 20,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "yield"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/options.json
new file mode 100644
index 0000000000..aca079ee39
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:20)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/actual.js
new file mode 100644
index 0000000000..f2d5c1f89b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/actual.js
@@ -0,0 +1 @@
+"use strict"; var { x: yield } = foo;
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/expected.json
new file mode 100644
index 0000000000..e95af9ede1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/expected.json
@@ -0,0 +1,184 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 14,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 18,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 20,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "x"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "name": "yield"
+ },
+ "kind": "init"
+ }
+ ]
+ },
+ "init": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/options.json
new file mode 100644
index 0000000000..2ddc9e708f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:23)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/actual.js
new file mode 100644
index 0000000000..f7734c9a28
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/actual.js
@@ -0,0 +1 @@
+"use strict"; try {} catch (yield) {}
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/expected.json
new file mode 100644
index 0000000000..6dc10fb160
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/expected.json
@@ -0,0 +1,149 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 14,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 21,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 28,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "yield"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 35,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/options.json
new file mode 100644
index 0000000000..f55830c1c3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:28)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/actual.js
new file mode 100644
index 0000000000..333040f339
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/actual.js
@@ -0,0 +1 @@
+"use strict"; function f(yield) {}
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/expected.json
new file mode 100644
index 0000000000..376968b605
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/expected.json
@@ -0,0 +1,135 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 25,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "name": "yield"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 32,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/options.json
new file mode 100644
index 0000000000..b242442b4c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:25)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/actual.js
new file mode 100644
index 0000000000..01909ba03e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/actual.js
@@ -0,0 +1 @@
+function yield(){ "use strict"; }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/expected.json
new file mode 100644
index 0000000000..83a78a03c2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "yield"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/options.json
new file mode 100644
index 0000000000..ce6a7da479
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding yield in strict mode (1:9)"
+}
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/actual.js
new file mode 100644
index 0000000000..e0b8151268
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/actual.js
@@ -0,0 +1 @@
+(function yield(){ "use strict"; })
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/expected.json
new file mode 100644
index 0000000000..a12316ae59
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/expected.json
@@ -0,0 +1,133 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "yield"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/options.json
new file mode 100644
index 0000000000..95d52f45f5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding yield in strict mode (1:10)"
+}
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/actual.js
new file mode 100644
index 0000000000..bba51e2706
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/actual.js
@@ -0,0 +1 @@
+"use strict"; function f() { yield }
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/expected.json
new file mode 100644
index 0000000000..2bdc41583c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/expected.json
@@ -0,0 +1,148 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ },
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 29,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 29,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "name": "yield"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/options.json
new file mode 100644
index 0000000000..6079f138a6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:29)"
+}
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/actual.js
new file mode 100644
index 0000000000..71917f956c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/actual.js
@@ -0,0 +1 @@
+"use strict"; let yield = 42;
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/expected.json
new file mode 100644
index 0000000000..9d4ab39950
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 18,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "yield"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 26,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/options.json
new file mode 100644
index 0000000000..2a73699bc2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/actual.js
new file mode 100644
index 0000000000..d9d63622bb
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/actual.js
@@ -0,0 +1 @@
+"use strict"; function f(...yield) {}
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/expected.json
new file mode 100644
index 0000000000..61833fb65c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "RestElement",
+ "start": 25,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 28,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "yield"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 35,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/options.json
new file mode 100644
index 0000000000..f55830c1c3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:28)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/actual.js b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/actual.js
new file mode 100644
index 0000000000..455ea8aa00
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/actual.js
@@ -0,0 +1 @@
+"use strict"; var yield;
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/expected.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/expected.json
new file mode 100644
index 0000000000..d34ac72f7a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 14,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 18,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "yield"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/options.json b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/options.json
new file mode 100644
index 0000000000..2a73699bc2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-array-pattern/actual.js b/test/fixtures/esprima/es2015-yield/yield-array-pattern/actual.js
new file mode 100644
index 0000000000..f4a21e5ac5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-array-pattern/actual.js
@@ -0,0 +1 @@
+([yield] = x)
diff --git a/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json b/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json
new file mode 100644
index 0000000000..7a4fbd86f6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 1,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ArrayPattern",
+ "start": 1,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 2,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "yield"
+ }
+ ]
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "x"
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-arrow-concise-body/actual.js b/test/fixtures/esprima/es2015-yield/yield-arrow-concise-body/actual.js
new file mode 100644
index 0000000000..e6844e30f5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-arrow-concise-body/actual.js
@@ -0,0 +1 @@
+(x) => x * yield;
diff --git a/test/fixtures/esprima/es2015-yield/yield-arrow-concise-body/expected.json b/test/fixtures/esprima/es2015-yield/yield-arrow-concise-body/expected.json
new file mode 100644
index 0000000000..81505c98aa
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-arrow-concise-body/expected.json
@@ -0,0 +1,132 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "x"
+ }
+ ],
+ "body": {
+ "type": "BinaryExpression",
+ "start": 7,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "x"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "yield"
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-arrow-function-body/actual.js b/test/fixtures/esprima/es2015-yield/yield-arrow-function-body/actual.js
new file mode 100644
index 0000000000..b8c73aaa9c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-arrow-function-body/actual.js
@@ -0,0 +1 @@
+(z) => { yield + z };
diff --git a/test/fixtures/esprima/es2015-yield/yield-arrow-function-body/expected.json b/test/fixtures/esprima/es2015-yield/yield-arrow-function-body/expected.json
new file mode 100644
index 0000000000..524a90fb9e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-arrow-function-body/expected.json
@@ -0,0 +1,164 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "z"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 7,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "yield"
+ },
+ "operator": "+",
+ "right": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-default/actual.js b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-default/actual.js
new file mode 100644
index 0000000000..e4bd6e2eb5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-default/actual.js
@@ -0,0 +1 @@
+(x = yield) => {}
diff --git a/test/fixtures/harmony/uncategorised/57/expected.json b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-default/expected.json
similarity index 68%
rename from test/fixtures/harmony/uncategorised/57/expected.json
rename to test/fixtures/esprima/es2015-yield/yield-arrow-parameter-default/expected.json
index 8dd4aace6c..2058074918 100644
--- a/test/fixtures/harmony/uncategorised/57/expected.json
+++ b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-default/expected.json
@@ -1,7 +1,7 @@
{
"type": "File",
"start": 0,
- "end": 20,
+ "end": 17,
"loc": {
"start": {
"line": 1,
@@ -9,13 +9,13 @@
},
"end": {
"line": 1,
- "column": 20
+ "column": 17
}
},
"program": {
"type": "Program",
"start": 0,
- "end": 20,
+ "end": 17,
"loc": {
"start": {
"line": 1,
@@ -23,7 +23,7 @@
},
"end": {
"line": 1,
- "column": 20
+ "column": 17
}
},
"sourceType": "script",
@@ -31,7 +31,7 @@
{
"type": "ExpressionStatement",
"start": 0,
- "end": 20,
+ "end": 17,
"loc": {
"start": {
"line": 1,
@@ -39,13 +39,13 @@
},
"end": {
"line": 1,
- "column": 20
+ "column": 17
}
},
"expression": {
- "type": "ComprehensionExpression",
+ "type": "ArrowFunctionExpression",
"start": 0,
- "end": 20,
+ "end": 17,
"loc": {
"start": {
"line": 1,
@@ -53,14 +53,17 @@
},
"end": {
"line": 1,
- "column": 20
+ "column": 17
}
},
- "blocks": [
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
{
- "type": "ComprehensionBlock",
+ "type": "AssignmentPattern",
"start": 1,
- "end": 17,
+ "end": 10,
"loc": {
"start": {
"line": 1,
@@ -68,64 +71,61 @@
},
"end": {
"line": 1,
- "column": 17
+ "column": 10
}
},
"left": {
"type": "Identifier",
- "start": 6,
- "end": 7,
+ "start": 1,
+ "end": 2,
"loc": {
"start": {
"line": 1,
- "column": 6
+ "column": 1
},
"end": {
"line": 1,
- "column": 7
+ "column": 2
}
},
"name": "x"
},
"right": {
"type": "Identifier",
- "start": 11,
- "end": 16,
+ "start": 5,
+ "end": 10,
"loc": {
"start": {
"line": 1,
- "column": 11
+ "column": 5
},
"end": {
"line": 1,
- "column": 16
+ "column": 10
}
},
- "name": "array"
+ "name": "yield"
}
}
],
- "filter": null,
"body": {
- "type": "Identifier",
- "start": 18,
- "end": 19,
+ "type": "BlockStatement",
+ "start": 15,
+ "end": 17,
"loc": {
"start": {
"line": 1,
- "column": 18
+ "column": 15
},
"end": {
"line": 1,
- "column": 19
+ "column": 17
}
},
- "name": "x"
- },
- "generator": false
+ "body": []
+ }
}
}
]
- },
- "comments": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/actual.js b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/actual.js
new file mode 100644
index 0000000000..db130ff82d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/actual.js
@@ -0,0 +1 @@
+(yield) => 42;
diff --git a/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json
new file mode 100644
index 0000000000..9c2f1fefbe
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "yield"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 11,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-binding-element/actual.js b/test/fixtures/esprima/es2015-yield/yield-binding-element/actual.js
new file mode 100644
index 0000000000..4e915ae558
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-binding-element/actual.js
@@ -0,0 +1 @@
+var { x: yield } = foo;
diff --git a/test/fixtures/esprima/es2015-yield/yield-binding-element/expected.json b/test/fixtures/esprima/es2015-yield/yield-binding-element/expected.json
new file mode 100644
index 0000000000..09eb1bcbb8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-binding-element/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 4,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 6,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "yield"
+ }
+ }
+ ]
+ },
+ "init": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-binding-property/actual.js b/test/fixtures/esprima/es2015-yield/yield-binding-property/actual.js
new file mode 100644
index 0000000000..2387b61668
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-binding-property/actual.js
@@ -0,0 +1 @@
+var { yield: x } = foo;
diff --git a/test/fixtures/esprima/es2015-yield/yield-binding-property/expected.json b/test/fixtures/esprima/es2015-yield/yield-binding-property/expected.json
new file mode 100644
index 0000000000..7b85a9fef5
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-binding-property/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 4,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 6,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "yield"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "x"
+ }
+ }
+ ]
+ },
+ "init": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-call-expression-property/actual.js b/test/fixtures/esprima/es2015-yield/yield-call-expression-property/actual.js
new file mode 100644
index 0000000000..3faf4147c7
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-call-expression-property/actual.js
@@ -0,0 +1 @@
+function *g() { obj.yield(); }
diff --git a/test/fixtures/esprima/es2015-yield/yield-call-expression-property/expected.json b/test/fixtures/esprima/es2015-yield/yield-call-expression-property/expected.json
new file mode 100644
index 0000000000..2e11c61b3c
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-call-expression-property/expected.json
@@ -0,0 +1,163 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 16,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 16,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 16,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "obj"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "yield"
+ },
+ "computed": false
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-catch-parameter/actual.js b/test/fixtures/esprima/es2015-yield/yield-catch-parameter/actual.js
new file mode 100644
index 0000000000..42c9869dc1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-catch-parameter/actual.js
@@ -0,0 +1 @@
+try {} catch (yield) {}
diff --git a/test/fixtures/esprima/es2015-yield/yield-catch-parameter/expected.json b/test/fixtures/esprima/es2015-yield/yield-catch-parameter/expected.json
new file mode 100644
index 0000000000..3cba41671f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-catch-parameter/expected.json
@@ -0,0 +1,113 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "body": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 7,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "yield"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-expression-precedence/actual.js b/test/fixtures/esprima/es2015-yield/yield-expression-precedence/actual.js
new file mode 100644
index 0000000000..5dca227228
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-expression-precedence/actual.js
@@ -0,0 +1 @@
+function *g() { yield a=b, yield* c=d, e }
diff --git a/test/fixtures/esprima/es2015-yield/yield-expression-precedence/expected.json b/test/fixtures/esprima/es2015-yield/yield-expression-precedence/expected.json
new file mode 100644
index 0000000000..8a39ff485d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-expression-precedence/expected.json
@@ -0,0 +1,260 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 16,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "expression": {
+ "type": "SequenceExpression",
+ "start": 16,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "expressions": [
+ {
+ "type": "YieldExpression",
+ "start": 16,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "delegate": false,
+ "argument": {
+ "type": "AssignmentExpression",
+ "start": 22,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "b"
+ }
+ }
+ },
+ {
+ "type": "YieldExpression",
+ "start": 27,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "delegate": true,
+ "argument": {
+ "type": "AssignmentExpression",
+ "start": 34,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 34,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "name": "c"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "name": "d"
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "start": 39,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "name": "e"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-function-declaration-formal-parameter/actual.js b/test/fixtures/esprima/es2015-yield/yield-function-declaration-formal-parameter/actual.js
new file mode 100644
index 0000000000..0f1d08ca70
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-function-declaration-formal-parameter/actual.js
@@ -0,0 +1 @@
+function f(yield) {}
diff --git a/test/fixtures/esprima/es2015-yield/yield-function-declaration-formal-parameter/expected.json b/test/fixtures/esprima/es2015-yield/yield-function-declaration-formal-parameter/expected.json
new file mode 100644
index 0000000000..f16d4b50a4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-function-declaration-formal-parameter/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "yield"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-function-declaration/actual.js b/test/fixtures/esprima/es2015-yield/yield-function-declaration/actual.js
new file mode 100644
index 0000000000..fe8a313f26
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-function-declaration/actual.js
@@ -0,0 +1 @@
+function yield(){}
diff --git a/test/fixtures/esprima/es2015-yield/yield-function-declaration/expected.json b/test/fixtures/esprima/es2015-yield/yield-function-declaration/expected.json
new file mode 100644
index 0000000000..18ef7bd43a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-function-declaration/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "yield"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/actual.js b/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/actual.js
new file mode 100644
index 0000000000..0f2ffa39ca
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/actual.js
@@ -0,0 +1 @@
+(function(yield) {})
diff --git a/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json b/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json
new file mode 100644
index 0000000000..72a06d9cce
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 10,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "yield"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-function-expression/actual.js b/test/fixtures/esprima/es2015-yield/yield-function-expression/actual.js
new file mode 100644
index 0000000000..d8d03fa6de
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-function-expression/actual.js
@@ -0,0 +1 @@
+(function yield(){})
diff --git a/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json b/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json
new file mode 100644
index 0000000000..a2138f73ef
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "yield"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/actual.js b/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/actual.js
new file mode 100644
index 0000000000..fafac7f806
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/actual.js
@@ -0,0 +1 @@
+function *g() { (x = yield) => {} }
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/expected.json b/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/expected.json
new file mode 100644
index 0000000000..f9c4899032
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/expected.json
@@ -0,0 +1,183 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 16,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 16,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 17,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "YieldExpression",
+ "start": 21,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "delegate": false,
+ "argument": null
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 31,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-arrow-function-body/actual.js b/test/fixtures/esprima/es2015-yield/yield-generator-arrow-function-body/actual.js
new file mode 100644
index 0000000000..7f27722f51
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-arrow-function-body/actual.js
@@ -0,0 +1 @@
+function *g() { (z) => { yield + z }; }
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-arrow-function-body/expected.json b/test/fixtures/esprima/es2015-yield/yield-generator-arrow-function-body/expected.json
new file mode 100644
index 0000000000..8ee47195d3
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-arrow-function-body/expected.json
@@ -0,0 +1,215 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 16,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 16,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "z"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 25,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 25,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 25,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "name": "yield"
+ },
+ "operator": "+",
+ "right": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-declaration/actual.js b/test/fixtures/esprima/es2015-yield/yield-generator-declaration/actual.js
new file mode 100644
index 0000000000..be10f1b197
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-declaration/actual.js
@@ -0,0 +1 @@
+function *yield(){}
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-declaration/expected.json b/test/fixtures/esprima/es2015-yield/yield-generator-declaration/expected.json
new file mode 100644
index 0000000000..76d7225d05
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-declaration/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "yield"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-default-parameter/actual.js b/test/fixtures/esprima/es2015-yield/yield-generator-default-parameter/actual.js
new file mode 100644
index 0000000000..98b544c1c1
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-default-parameter/actual.js
@@ -0,0 +1 @@
+function *g(x = yield){}
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-default-parameter/expected.json b/test/fixtures/esprima/es2015-yield/yield-generator-default-parameter/expected.json
new file mode 100644
index 0000000000..272c0b0c3d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-default-parameter/expected.json
@@ -0,0 +1,131 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 12,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "yield"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 22,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-method/actual.js b/test/fixtures/esprima/es2015-yield/yield-generator-method/actual.js
new file mode 100644
index 0000000000..09daccad90
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-method/actual.js
@@ -0,0 +1 @@
+({ *yield() {} })
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json b/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json
new file mode 100644
index 0000000000..660094298e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json
@@ -0,0 +1,125 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 3,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "yield"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 12,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-parameter-object-pattern/actual.js b/test/fixtures/esprima/es2015-yield/yield-generator-parameter-object-pattern/actual.js
new file mode 100644
index 0000000000..a97e6379c4
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-parameter-object-pattern/actual.js
@@ -0,0 +1 @@
+function *g({yield: y}){}
diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-parameter-object-pattern/expected.json b/test/fixtures/esprima/es2015-yield/yield-generator-parameter-object-pattern/expected.json
new file mode 100644
index 0000000000..b212d5a14f
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-generator-parameter-object-pattern/expected.json
@@ -0,0 +1,153 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "ObjectPattern",
+ "start": 12,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 13,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "yield"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "y"
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/actual.js b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/actual.js
new file mode 100644
index 0000000000..f2faf618ec
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/actual.js
@@ -0,0 +1 @@
+let yield = 42;
diff --git a/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json
new file mode 100644
index 0000000000..1b530aaaf0
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "yield"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-member-expression-property/actual.js b/test/fixtures/esprima/es2015-yield/yield-member-expression-property/actual.js
new file mode 100644
index 0000000000..aa6e4c82e6
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-member-expression-property/actual.js
@@ -0,0 +1 @@
+function *g() { yield obj.yield; }
diff --git a/test/fixtures/esprima/es2015-yield/yield-member-expression-property/expected.json b/test/fixtures/esprima/es2015-yield/yield-member-expression-property/expected.json
new file mode 100644
index 0000000000..091dac5d5d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-member-expression-property/expected.json
@@ -0,0 +1,163 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 16,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 16,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "delegate": false,
+ "argument": {
+ "type": "MemberExpression",
+ "start": 22,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "obj"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "yield"
+ },
+ "computed": false
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-method/actual.js b/test/fixtures/esprima/es2015-yield/yield-method/actual.js
new file mode 100644
index 0000000000..fe2070884e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-method/actual.js
@@ -0,0 +1 @@
+({ yield() {} })
diff --git a/test/fixtures/esprima/es2015-yield/yield-method/expected.json b/test/fixtures/esprima/es2015-yield/yield-method/expected.json
new file mode 100644
index 0000000000..73a6d2827d
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-method/expected.json
@@ -0,0 +1,125 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 3,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "yield"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 11,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/actual.js b/test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/actual.js
new file mode 100644
index 0000000000..fe3cb6d854
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/actual.js
@@ -0,0 +1 @@
+function f({yield: y}){}
diff --git a/test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/expected.json b/test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/expected.json
new file mode 100644
index 0000000000..f0dc7b4f27
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/expected.json
@@ -0,0 +1,153 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "ObjectPattern",
+ "start": 11,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 12,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "yield"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "y"
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 22,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-rest-parameter/actual.js b/test/fixtures/esprima/es2015-yield/yield-rest-parameter/actual.js
new file mode 100644
index 0000000000..0a895a5c11
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-rest-parameter/actual.js
@@ -0,0 +1 @@
+function f(...yield) {}
diff --git a/test/fixtures/esprima/es2015-yield/yield-rest-parameter/expected.json b/test/fixtures/esprima/es2015-yield/yield-rest-parameter/expected.json
new file mode 100644
index 0000000000..bfd5f8f9d2
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-rest-parameter/expected.json
@@ -0,0 +1,115 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "f"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "RestElement",
+ "start": 11,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "yield"
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/actual.js b/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/actual.js
new file mode 100644
index 0000000000..b90497633b
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/actual.js
@@ -0,0 +1 @@
+"use strict"; var { yield: x } = foo;
diff --git a/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json b/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json
new file mode 100644
index 0000000000..687e8f341a
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 14,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 18,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 20,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "yield"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "name": "x"
+ }
+ }
+ ]
+ },
+ "init": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "value": "use strict",
+ "extra": {
+ "raw": "\"use strict\"",
+ "rawValue": "use strict"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-strict-method/actual.js b/test/fixtures/esprima/es2015-yield/yield-strict-method/actual.js
new file mode 100644
index 0000000000..a24661b935
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-strict-method/actual.js
@@ -0,0 +1 @@
+"use strict"; ({ yield() {} })
diff --git a/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json b/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json
new file mode 100644
index 0000000000..e71a000bbe
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json
@@ -0,0 +1,161 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 15,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectMethod",
+ "start": 17,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "yield"
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 25,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "value": "use strict",
+ "extra": {
+ "raw": "\"use strict\"",
+ "rawValue": "use strict"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-super-property/actual.js b/test/fixtures/esprima/es2015-yield/yield-super-property/actual.js
new file mode 100644
index 0000000000..d3a2c77709
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-super-property/actual.js
@@ -0,0 +1 @@
+class A extends B { X() { super.yield } }
diff --git a/test/fixtures/esprima/es2015-yield/yield-super-property/expected.json b/test/fixtures/esprima/es2015-yield/yield-super-property/expected.json
new file mode 100644
index 0000000000..ef8158ed4e
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-super-property/expected.json
@@ -0,0 +1,216 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "B"
+ },
+ "body": {
+ "type": "ClassBody",
+ "start": 18,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 20,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "X"
+ },
+ "static": false,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 24,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 26,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 26,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "object": {
+ "type": "Super",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "name": "yield"
+ },
+ "computed": false
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-variable-declaration/actual.js b/test/fixtures/esprima/es2015-yield/yield-variable-declaration/actual.js
new file mode 100644
index 0000000000..1d02d76086
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-variable-declaration/actual.js
@@ -0,0 +1 @@
+var yield;
diff --git a/test/fixtures/esprima/es2015-yield/yield-variable-declaration/expected.json b/test/fixtures/esprima/es2015-yield/yield-variable-declaration/expected.json
new file mode 100644
index 0000000000..2c21f2ba38
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-variable-declaration/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "yield"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-yield-expression-delegate/actual.js b/test/fixtures/esprima/es2015-yield/yield-yield-expression-delegate/actual.js
new file mode 100644
index 0000000000..800c8c7f34
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-yield-expression-delegate/actual.js
@@ -0,0 +1 @@
+function *g() { yield *yield }
diff --git a/test/fixtures/esprima/es2015-yield/yield-yield-expression-delegate/expected.json b/test/fixtures/esprima/es2015-yield/yield-yield-expression-delegate/expected.json
new file mode 100644
index 0000000000..be7cde28c8
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-yield-expression-delegate/expected.json
@@ -0,0 +1,132 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 16,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 16,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "delegate": true,
+ "argument": {
+ "type": "YieldExpression",
+ "start": 23,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "delegate": false,
+ "argument": null
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/es2015-yield/yield-yield-expression/actual.js b/test/fixtures/esprima/es2015-yield/yield-yield-expression/actual.js
new file mode 100644
index 0000000000..205c792662
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-yield-expression/actual.js
@@ -0,0 +1 @@
+function *g() { yield yield }
diff --git a/test/fixtures/esprima/es2015-yield/yield-yield-expression/expected.json b/test/fixtures/esprima/es2015-yield/yield-yield-expression/expected.json
new file mode 100644
index 0000000000..299cd23813
--- /dev/null
+++ b/test/fixtures/esprima/es2015-yield/yield-yield-expression/expected.json
@@ -0,0 +1,132 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "g"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 16,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "expression": {
+ "type": "YieldExpression",
+ "start": 16,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "delegate": false,
+ "argument": {
+ "type": "YieldExpression",
+ "start": 22,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "delegate": false,
+ "argument": null
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-additive/migrated_0000/actual.js b/test/fixtures/esprima/expression-additive/migrated_0000/actual.js
new file mode 100644
index 0000000000..beeb1e5903
--- /dev/null
+++ b/test/fixtures/esprima/expression-additive/migrated_0000/actual.js
@@ -0,0 +1 @@
+x + y
diff --git a/test/fixtures/esprima/expression-additive/migrated_0000/expected.json b/test/fixtures/esprima/expression-additive/migrated_0000/expected.json
new file mode 100644
index 0000000000..951a2c8573
--- /dev/null
+++ b/test/fixtures/esprima/expression-additive/migrated_0000/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "+",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-additive/migrated_0001/actual.js b/test/fixtures/esprima/expression-additive/migrated_0001/actual.js
new file mode 100644
index 0000000000..82b2d8de84
--- /dev/null
+++ b/test/fixtures/esprima/expression-additive/migrated_0001/actual.js
@@ -0,0 +1 @@
+x - y
diff --git a/test/fixtures/esprima/expression-additive/migrated_0001/expected.json b/test/fixtures/esprima/expression-additive/migrated_0001/expected.json
new file mode 100644
index 0000000000..4be8cd12bf
--- /dev/null
+++ b/test/fixtures/esprima/expression-additive/migrated_0001/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "-",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-additive/migrated_0002/actual.js b/test/fixtures/esprima/expression-additive/migrated_0002/actual.js
new file mode 100644
index 0000000000..dcc0e169ca
--- /dev/null
+++ b/test/fixtures/esprima/expression-additive/migrated_0002/actual.js
@@ -0,0 +1 @@
+"use strict" + 42
diff --git a/test/fixtures/esprima/expression-additive/migrated_0002/expected.json b/test/fixtures/esprima/expression-additive/migrated_0002/expected.json
new file mode 100644
index 0000000000..e1846ee7d4
--- /dev/null
+++ b/test/fixtures/esprima/expression-additive/migrated_0002/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "left": {
+ "type": "StringLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "extra": {
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ },
+ "value": "use strict"
+ },
+ "operator": "+",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0000/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0000/actual.js
new file mode 100644
index 0000000000..2d76abaa89
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0000/actual.js
@@ -0,0 +1 @@
+x = 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json
new file mode 100644
index 0000000000..c55cb13771
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 4,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0001/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0001/actual.js
new file mode 100644
index 0000000000..ec77db7c41
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0001/actual.js
@@ -0,0 +1 @@
+eval = 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json
new file mode 100644
index 0000000000..ccef73317a
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "eval"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 7,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0002/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0002/actual.js
new file mode 100644
index 0000000000..8915ea9874
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0002/actual.js
@@ -0,0 +1 @@
+arguments = 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json
new file mode 100644
index 0000000000..90279da775
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "arguments"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0003/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0003/actual.js
new file mode 100644
index 0000000000..800fe89767
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0003/actual.js
@@ -0,0 +1 @@
+x *= 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json
new file mode 100644
index 0000000000..8c50cdf2f0
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "operator": "*=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0004/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0004/actual.js
new file mode 100644
index 0000000000..e6d4af128c
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0004/actual.js
@@ -0,0 +1 @@
+x /= 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json
new file mode 100644
index 0000000000..6c210fd1b6
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "operator": "/=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0005/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0005/actual.js
new file mode 100644
index 0000000000..1fdb8c843b
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0005/actual.js
@@ -0,0 +1 @@
+x %= 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json
new file mode 100644
index 0000000000..2c333b70e1
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "operator": "%=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0006/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0006/actual.js
new file mode 100644
index 0000000000..76d0126c78
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0006/actual.js
@@ -0,0 +1 @@
+x += 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json
new file mode 100644
index 0000000000..53c21fe4d6
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "operator": "+=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0007/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0007/actual.js
new file mode 100644
index 0000000000..9efddfe799
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0007/actual.js
@@ -0,0 +1 @@
+x -= 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json
new file mode 100644
index 0000000000..abc4cb0406
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "operator": "-=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0008/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0008/actual.js
new file mode 100644
index 0000000000..0ec003b342
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0008/actual.js
@@ -0,0 +1 @@
+x <<= 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json
new file mode 100644
index 0000000000..3c8c2893e8
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "operator": "<<=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 6,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0009/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0009/actual.js
new file mode 100644
index 0000000000..985184e363
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0009/actual.js
@@ -0,0 +1 @@
+x >>= 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json
new file mode 100644
index 0000000000..cfa8f98dfa
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "operator": ">>=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 6,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0010/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0010/actual.js
new file mode 100644
index 0000000000..4ddbf45b90
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0010/actual.js
@@ -0,0 +1 @@
+x >>>= 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json
new file mode 100644
index 0000000000..ff6f9db71d
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "operator": ">>>=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 7,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0011/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0011/actual.js
new file mode 100644
index 0000000000..021d2208ec
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0011/actual.js
@@ -0,0 +1 @@
+x &= 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json
new file mode 100644
index 0000000000..3719a7fafe
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "operator": "&=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0012/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0012/actual.js
new file mode 100644
index 0000000000..77975a2659
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0012/actual.js
@@ -0,0 +1 @@
+x ^= 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json
new file mode 100644
index 0000000000..84a3e7d56e
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "operator": "^=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0013/actual.js b/test/fixtures/esprima/expression-assignment/migrated_0013/actual.js
new file mode 100644
index 0000000000..8bbad8cd9f
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0013/actual.js
@@ -0,0 +1 @@
+x |= 42
diff --git a/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json
new file mode 100644
index 0000000000..456765cc37
--- /dev/null
+++ b/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json
@@ -0,0 +1,101 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "operator": "|=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary-bitwise/migrated_0000/actual.js b/test/fixtures/esprima/expression-binary-bitwise/migrated_0000/actual.js
new file mode 100644
index 0000000000..9d87069548
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-bitwise/migrated_0000/actual.js
@@ -0,0 +1 @@
+x & y
diff --git a/test/fixtures/esprima/expression-binary-bitwise/migrated_0000/expected.json b/test/fixtures/esprima/expression-binary-bitwise/migrated_0000/expected.json
new file mode 100644
index 0000000000..a21f7900f7
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-bitwise/migrated_0000/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "&",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary-bitwise/migrated_0001/actual.js b/test/fixtures/esprima/expression-binary-bitwise/migrated_0001/actual.js
new file mode 100644
index 0000000000..460a89ecfa
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-bitwise/migrated_0001/actual.js
@@ -0,0 +1 @@
+x ^ y
diff --git a/test/fixtures/esprima/expression-binary-bitwise/migrated_0001/expected.json b/test/fixtures/esprima/expression-binary-bitwise/migrated_0001/expected.json
new file mode 100644
index 0000000000..9ff129d06b
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-bitwise/migrated_0001/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "^",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary-bitwise/migrated_0002/actual.js b/test/fixtures/esprima/expression-binary-bitwise/migrated_0002/actual.js
new file mode 100644
index 0000000000..07736e61c3
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-bitwise/migrated_0002/actual.js
@@ -0,0 +1 @@
+x | y
diff --git a/test/fixtures/esprima/expression-binary-bitwise/migrated_0002/expected.json b/test/fixtures/esprima/expression-binary-bitwise/migrated_0002/expected.json
new file mode 100644
index 0000000000..2c6c6a71aa
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-bitwise/migrated_0002/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "|",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0000/actual.js b/test/fixtures/esprima/expression-binary-logical/migrated_0000/actual.js
new file mode 100644
index 0000000000..d3891c2c9c
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0000/actual.js
@@ -0,0 +1 @@
+x || y
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0000/expected.json b/test/fixtures/esprima/expression-binary-logical/migrated_0000/expected.json
new file mode 100644
index 0000000000..43821da431
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0000/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "LogicalExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "||",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0001/actual.js b/test/fixtures/esprima/expression-binary-logical/migrated_0001/actual.js
new file mode 100644
index 0000000000..7d5be6bfd1
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0001/actual.js
@@ -0,0 +1 @@
+x && y
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0001/expected.json b/test/fixtures/esprima/expression-binary-logical/migrated_0001/expected.json
new file mode 100644
index 0000000000..7b3dce0fdb
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0001/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "LogicalExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "&&",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0002/actual.js b/test/fixtures/esprima/expression-binary-logical/migrated_0002/actual.js
new file mode 100644
index 0000000000..90e7cf52f1
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0002/actual.js
@@ -0,0 +1 @@
+x || y || z
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0002/expected.json b/test/fixtures/esprima/expression-binary-logical/migrated_0002/expected.json
new file mode 100644
index 0000000000..313205c734
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0002/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "LogicalExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "left": {
+ "type": "LogicalExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "||",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "||",
+ "right": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0003/actual.js b/test/fixtures/esprima/expression-binary-logical/migrated_0003/actual.js
new file mode 100644
index 0000000000..3a9c93b39c
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0003/actual.js
@@ -0,0 +1 @@
+x && y && z
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0003/expected.json b/test/fixtures/esprima/expression-binary-logical/migrated_0003/expected.json
new file mode 100644
index 0000000000..076e9826f5
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0003/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "LogicalExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "left": {
+ "type": "LogicalExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "&&",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "&&",
+ "right": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0004/actual.js b/test/fixtures/esprima/expression-binary-logical/migrated_0004/actual.js
new file mode 100644
index 0000000000..ba63b00838
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0004/actual.js
@@ -0,0 +1 @@
+x || y && z
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0004/expected.json b/test/fixtures/esprima/expression-binary-logical/migrated_0004/expected.json
new file mode 100644
index 0000000000..39a92de27e
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0004/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "LogicalExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "||",
+ "right": {
+ "type": "LogicalExpression",
+ "start": 5,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ },
+ "operator": "&&",
+ "right": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0005/actual.js b/test/fixtures/esprima/expression-binary-logical/migrated_0005/actual.js
new file mode 100644
index 0000000000..6ff43831c6
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0005/actual.js
@@ -0,0 +1 @@
+x || y ^ z
diff --git a/test/fixtures/esprima/expression-binary-logical/migrated_0005/expected.json b/test/fixtures/esprima/expression-binary-logical/migrated_0005/expected.json
new file mode 100644
index 0000000000..27399a9c53
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary-logical/migrated_0005/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "expression": {
+ "type": "LogicalExpression",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "||",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 5,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ },
+ "operator": "^",
+ "right": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0000/actual.js b/test/fixtures/esprima/expression-binary/migrated_0000/actual.js
new file mode 100644
index 0000000000..ace7e0bf2d
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0000/actual.js
@@ -0,0 +1 @@
+x + y + z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0000/expected.json b/test/fixtures/esprima/expression-binary/migrated_0000/expected.json
new file mode 100644
index 0000000000..102f5d3d69
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0000/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "+",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "+",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0001/actual.js b/test/fixtures/esprima/expression-binary/migrated_0001/actual.js
new file mode 100644
index 0000000000..689cb88717
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0001/actual.js
@@ -0,0 +1 @@
+x - y + z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0001/expected.json b/test/fixtures/esprima/expression-binary/migrated_0001/expected.json
new file mode 100644
index 0000000000..de56597e6a
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0001/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "-",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "+",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0002/actual.js b/test/fixtures/esprima/expression-binary/migrated_0002/actual.js
new file mode 100644
index 0000000000..89425f9273
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0002/actual.js
@@ -0,0 +1 @@
+x + y - z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0002/expected.json b/test/fixtures/esprima/expression-binary/migrated_0002/expected.json
new file mode 100644
index 0000000000..edc0351968
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0002/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "+",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "-",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0003/actual.js b/test/fixtures/esprima/expression-binary/migrated_0003/actual.js
new file mode 100644
index 0000000000..8e7a45ced7
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0003/actual.js
@@ -0,0 +1 @@
+x - y - z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0003/expected.json b/test/fixtures/esprima/expression-binary/migrated_0003/expected.json
new file mode 100644
index 0000000000..74e0ab65b8
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0003/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "-",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "-",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0004/actual.js b/test/fixtures/esprima/expression-binary/migrated_0004/actual.js
new file mode 100644
index 0000000000..6908de281f
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0004/actual.js
@@ -0,0 +1 @@
+x + y * z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0004/expected.json b/test/fixtures/esprima/expression-binary/migrated_0004/expected.json
new file mode 100644
index 0000000000..510073e483
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0004/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "+",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0005/actual.js b/test/fixtures/esprima/expression-binary/migrated_0005/actual.js
new file mode 100644
index 0000000000..05c8c505cf
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0005/actual.js
@@ -0,0 +1 @@
+x + y / z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0005/expected.json b/test/fixtures/esprima/expression-binary/migrated_0005/expected.json
new file mode 100644
index 0000000000..5e5fca2313
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0005/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "+",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ },
+ "operator": "/",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0006/actual.js b/test/fixtures/esprima/expression-binary/migrated_0006/actual.js
new file mode 100644
index 0000000000..4fde298f0f
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0006/actual.js
@@ -0,0 +1 @@
+x - y % z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0006/expected.json b/test/fixtures/esprima/expression-binary/migrated_0006/expected.json
new file mode 100644
index 0000000000..dc0ac6b9bf
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0006/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "-",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ },
+ "operator": "%",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0007/actual.js b/test/fixtures/esprima/expression-binary/migrated_0007/actual.js
new file mode 100644
index 0000000000..2487593dd8
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0007/actual.js
@@ -0,0 +1 @@
+x * y * z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0007/expected.json b/test/fixtures/esprima/expression-binary/migrated_0007/expected.json
new file mode 100644
index 0000000000..4beef8dd3d
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0007/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0008/actual.js b/test/fixtures/esprima/expression-binary/migrated_0008/actual.js
new file mode 100644
index 0000000000..0bfe2ae559
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0008/actual.js
@@ -0,0 +1 @@
+x * y / z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0008/expected.json b/test/fixtures/esprima/expression-binary/migrated_0008/expected.json
new file mode 100644
index 0000000000..9d743b0d39
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0008/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "/",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0009/actual.js b/test/fixtures/esprima/expression-binary/migrated_0009/actual.js
new file mode 100644
index 0000000000..862069a198
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0009/actual.js
@@ -0,0 +1 @@
+x * y % z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0009/expected.json b/test/fixtures/esprima/expression-binary/migrated_0009/expected.json
new file mode 100644
index 0000000000..3e5a22a223
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0009/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "%",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0010/actual.js b/test/fixtures/esprima/expression-binary/migrated_0010/actual.js
new file mode 100644
index 0000000000..77b5290486
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0010/actual.js
@@ -0,0 +1 @@
+x % y * z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0010/expected.json b/test/fixtures/esprima/expression-binary/migrated_0010/expected.json
new file mode 100644
index 0000000000..2174559e10
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0010/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "%",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0011/actual.js b/test/fixtures/esprima/expression-binary/migrated_0011/actual.js
new file mode 100644
index 0000000000..3e63d20011
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0011/actual.js
@@ -0,0 +1 @@
+x << y << z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0011/expected.json b/test/fixtures/esprima/expression-binary/migrated_0011/expected.json
new file mode 100644
index 0000000000..92c65557e6
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0011/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "<<",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "<<",
+ "right": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0012/actual.js b/test/fixtures/esprima/expression-binary/migrated_0012/actual.js
new file mode 100644
index 0000000000..7d90d68915
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0012/actual.js
@@ -0,0 +1 @@
+x | y | z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0012/expected.json b/test/fixtures/esprima/expression-binary/migrated_0012/expected.json
new file mode 100644
index 0000000000..188c481bfc
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0012/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "|",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "|",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0013/actual.js b/test/fixtures/esprima/expression-binary/migrated_0013/actual.js
new file mode 100644
index 0000000000..c6fe6c5daf
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0013/actual.js
@@ -0,0 +1 @@
+x & y & z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0013/expected.json b/test/fixtures/esprima/expression-binary/migrated_0013/expected.json
new file mode 100644
index 0000000000..3c6c2f0817
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0013/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "&",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "&",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0014/actual.js b/test/fixtures/esprima/expression-binary/migrated_0014/actual.js
new file mode 100644
index 0000000000..c2d0bfe871
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0014/actual.js
@@ -0,0 +1 @@
+x ^ y ^ z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0014/expected.json b/test/fixtures/esprima/expression-binary/migrated_0014/expected.json
new file mode 100644
index 0000000000..48e47e4198
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0014/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "^",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "^",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0015/actual.js b/test/fixtures/esprima/expression-binary/migrated_0015/actual.js
new file mode 100644
index 0000000000..962182f597
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0015/actual.js
@@ -0,0 +1 @@
+x & y | z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0015/expected.json b/test/fixtures/esprima/expression-binary/migrated_0015/expected.json
new file mode 100644
index 0000000000..0fa66acc0b
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0015/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "&",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "|",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0016/actual.js b/test/fixtures/esprima/expression-binary/migrated_0016/actual.js
new file mode 100644
index 0000000000..25a30410da
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0016/actual.js
@@ -0,0 +1 @@
+x | y ^ z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0016/expected.json b/test/fixtures/esprima/expression-binary/migrated_0016/expected.json
new file mode 100644
index 0000000000..c8df10d3d8
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0016/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "|",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ },
+ "operator": "^",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-binary/migrated_0017/actual.js b/test/fixtures/esprima/expression-binary/migrated_0017/actual.js
new file mode 100644
index 0000000000..4e4b638c97
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0017/actual.js
@@ -0,0 +1 @@
+x | y & z
diff --git a/test/fixtures/esprima/expression-binary/migrated_0017/expected.json b/test/fixtures/esprima/expression-binary/migrated_0017/expected.json
new file mode 100644
index 0000000000..c66d330503
--- /dev/null
+++ b/test/fixtures/esprima/expression-binary/migrated_0017/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "|",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ },
+ "operator": "&",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-bitwise-shift/migrated_0000/actual.js b/test/fixtures/esprima/expression-bitwise-shift/migrated_0000/actual.js
new file mode 100644
index 0000000000..9956b52bbb
--- /dev/null
+++ b/test/fixtures/esprima/expression-bitwise-shift/migrated_0000/actual.js
@@ -0,0 +1 @@
+x << y
diff --git a/test/fixtures/esprima/expression-bitwise-shift/migrated_0000/expected.json b/test/fixtures/esprima/expression-bitwise-shift/migrated_0000/expected.json
new file mode 100644
index 0000000000..7da984159e
--- /dev/null
+++ b/test/fixtures/esprima/expression-bitwise-shift/migrated_0000/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "<<",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-bitwise-shift/migrated_0001/actual.js b/test/fixtures/esprima/expression-bitwise-shift/migrated_0001/actual.js
new file mode 100644
index 0000000000..97b03e6112
--- /dev/null
+++ b/test/fixtures/esprima/expression-bitwise-shift/migrated_0001/actual.js
@@ -0,0 +1 @@
+x >> y
diff --git a/test/fixtures/esprima/expression-bitwise-shift/migrated_0001/expected.json b/test/fixtures/esprima/expression-bitwise-shift/migrated_0001/expected.json
new file mode 100644
index 0000000000..51b1fefd9e
--- /dev/null
+++ b/test/fixtures/esprima/expression-bitwise-shift/migrated_0001/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": ">>",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-bitwise-shift/migrated_0002/actual.js b/test/fixtures/esprima/expression-bitwise-shift/migrated_0002/actual.js
new file mode 100644
index 0000000000..6605695a6b
--- /dev/null
+++ b/test/fixtures/esprima/expression-bitwise-shift/migrated_0002/actual.js
@@ -0,0 +1 @@
+x >>> y
diff --git a/test/fixtures/esprima/expression-bitwise-shift/migrated_0002/expected.json b/test/fixtures/esprima/expression-bitwise-shift/migrated_0002/expected.json
new file mode 100644
index 0000000000..c61c63d02d
--- /dev/null
+++ b/test/fixtures/esprima/expression-bitwise-shift/migrated_0002/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": ">>>",
+ "right": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-complex/migrated_0000/actual.js b/test/fixtures/esprima/expression-complex/migrated_0000/actual.js
new file mode 100644
index 0000000000..2a769e96c3
--- /dev/null
+++ b/test/fixtures/esprima/expression-complex/migrated_0000/actual.js
@@ -0,0 +1 @@
+a || b && c | d ^ e & f == g < h >>> i + j * k
diff --git a/test/fixtures/esprima/expression-complex/migrated_0000/expected.json b/test/fixtures/esprima/expression-complex/migrated_0000/expected.json
new file mode 100644
index 0000000000..2158045bd1
--- /dev/null
+++ b/test/fixtures/esprima/expression-complex/migrated_0000/expected.json
@@ -0,0 +1,384 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "expression": {
+ "type": "LogicalExpression",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "a"
+ },
+ "operator": "||",
+ "right": {
+ "type": "LogicalExpression",
+ "start": 5,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "b"
+ },
+ "operator": "&&",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 10,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "c"
+ },
+ "operator": "|",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 14,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "d"
+ },
+ "operator": "^",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 18,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "e"
+ },
+ "operator": "&",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 22,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "f"
+ },
+ "operator": "==",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 27,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "name": "g"
+ },
+ "operator": "<",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 31,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "name": "h"
+ },
+ "operator": ">>>",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 37,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "name": "i"
+ },
+ "operator": "+",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 41,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 41,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "name": "j"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 45,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 45
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "name": "k"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-conditional/migrated_0000/actual.js b/test/fixtures/esprima/expression-conditional/migrated_0000/actual.js
new file mode 100644
index 0000000000..848240c6c6
--- /dev/null
+++ b/test/fixtures/esprima/expression-conditional/migrated_0000/actual.js
@@ -0,0 +1 @@
+y ? 1 : 2
diff --git a/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json
new file mode 100644
index 0000000000..0ae6562f5f
--- /dev/null
+++ b/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "ConditionalExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "test": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "y"
+ },
+ "consequent": {
+ "type": "NumberLiteral",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ },
+ "alternate": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-conditional/migrated_0001/actual.js b/test/fixtures/esprima/expression-conditional/migrated_0001/actual.js
new file mode 100644
index 0000000000..3f29ba0e20
--- /dev/null
+++ b/test/fixtures/esprima/expression-conditional/migrated_0001/actual.js
@@ -0,0 +1 @@
+x && y ? 1 : 2
diff --git a/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json
new file mode 100644
index 0000000000..5f5e161e69
--- /dev/null
+++ b/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json
@@ -0,0 +1,152 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "ConditionalExpression",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "test": {
+ "type": "LogicalExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "&&",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ },
+ "consequent": {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ },
+ "alternate": {
+ "type": "NumberLiteral",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-conditional/migrated_0002/actual.js b/test/fixtures/esprima/expression-conditional/migrated_0002/actual.js
new file mode 100644
index 0000000000..c63be97a08
--- /dev/null
+++ b/test/fixtures/esprima/expression-conditional/migrated_0002/actual.js
@@ -0,0 +1 @@
+x = (0) ? 1 : 2
diff --git a/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json
new file mode 100644
index 0000000000..bee8292533
--- /dev/null
+++ b/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json
@@ -0,0 +1,157 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "ConditionalExpression",
+ "start": 4,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "test": {
+ "type": "NumberLiteral",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0",
+ "parenthesized": true
+ },
+ "value": 0
+ },
+ "consequent": {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ },
+ "alternate": {
+ "type": "NumberLiteral",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-equality/migrated_0000/actual.js b/test/fixtures/esprima/expression-equality/migrated_0000/actual.js
new file mode 100644
index 0000000000..04dfc84773
--- /dev/null
+++ b/test/fixtures/esprima/expression-equality/migrated_0000/actual.js
@@ -0,0 +1 @@
+x == y
diff --git a/test/fixtures/esprima/expression-equality/migrated_0000/expected.json b/test/fixtures/esprima/expression-equality/migrated_0000/expected.json
new file mode 100644
index 0000000000..c1e5bf26af
--- /dev/null
+++ b/test/fixtures/esprima/expression-equality/migrated_0000/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "==",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-equality/migrated_0001/actual.js b/test/fixtures/esprima/expression-equality/migrated_0001/actual.js
new file mode 100644
index 0000000000..348bb48b0f
--- /dev/null
+++ b/test/fixtures/esprima/expression-equality/migrated_0001/actual.js
@@ -0,0 +1 @@
+x != y
diff --git a/test/fixtures/esprima/expression-equality/migrated_0001/expected.json b/test/fixtures/esprima/expression-equality/migrated_0001/expected.json
new file mode 100644
index 0000000000..8eb45e6a10
--- /dev/null
+++ b/test/fixtures/esprima/expression-equality/migrated_0001/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "!=",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-equality/migrated_0002/actual.js b/test/fixtures/esprima/expression-equality/migrated_0002/actual.js
new file mode 100644
index 0000000000..8193d1149a
--- /dev/null
+++ b/test/fixtures/esprima/expression-equality/migrated_0002/actual.js
@@ -0,0 +1 @@
+x === y
diff --git a/test/fixtures/esprima/expression-equality/migrated_0002/expected.json b/test/fixtures/esprima/expression-equality/migrated_0002/expected.json
new file mode 100644
index 0000000000..2610f3986a
--- /dev/null
+++ b/test/fixtures/esprima/expression-equality/migrated_0002/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "===",
+ "right": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-equality/migrated_0003/actual.js b/test/fixtures/esprima/expression-equality/migrated_0003/actual.js
new file mode 100644
index 0000000000..9060514515
--- /dev/null
+++ b/test/fixtures/esprima/expression-equality/migrated_0003/actual.js
@@ -0,0 +1 @@
+x !== y
diff --git a/test/fixtures/esprima/expression-equality/migrated_0003/expected.json b/test/fixtures/esprima/expression-equality/migrated_0003/expected.json
new file mode 100644
index 0000000000..ab3b9424ab
--- /dev/null
+++ b/test/fixtures/esprima/expression-equality/migrated_0003/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "!==",
+ "right": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-grouping/migrated_0000/actual.js b/test/fixtures/esprima/expression-grouping/migrated_0000/actual.js
new file mode 100644
index 0000000000..42734c6592
--- /dev/null
+++ b/test/fixtures/esprima/expression-grouping/migrated_0000/actual.js
@@ -0,0 +1 @@
+(1) + (2 ) + 3
diff --git a/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json b/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json
new file mode 100644
index 0000000000..030722007d
--- /dev/null
+++ b/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json
@@ -0,0 +1,143 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "left": {
+ "type": "NumberLiteral",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1",
+ "parenthesized": true
+ },
+ "value": 1
+ },
+ "operator": "+",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "extra": {
+ "rawValue": 2,
+ "raw": "2",
+ "parenthesized": true
+ },
+ "value": 2
+ }
+ },
+ "operator": "+",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-grouping/migrated_0001/actual.js b/test/fixtures/esprima/expression-grouping/migrated_0001/actual.js
new file mode 100644
index 0000000000..56c0cac6ce
--- /dev/null
+++ b/test/fixtures/esprima/expression-grouping/migrated_0001/actual.js
@@ -0,0 +1 @@
+4 + 5 << (6)
diff --git a/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json b/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json
new file mode 100644
index 0000000000..dfcea13c9a
--- /dev/null
+++ b/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json
@@ -0,0 +1,142 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "NumberLiteral",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "extra": {
+ "rawValue": 4,
+ "raw": "4"
+ },
+ "value": 4
+ },
+ "operator": "+",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "extra": {
+ "rawValue": 5,
+ "raw": "5"
+ },
+ "value": 5
+ }
+ },
+ "operator": "<<",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "extra": {
+ "rawValue": 6,
+ "raw": "6",
+ "parenthesized": true
+ },
+ "value": 6
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0000/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0000/actual.js
new file mode 100644
index 0000000000..f25591e1c1
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0000/actual.js
@@ -0,0 +1 @@
+new Button
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0000/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0000/expected.json
new file mode 100644
index 0000000000..08c175955a
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0000/expected.json
@@ -0,0 +1,80 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "Button"
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0001/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0001/actual.js
new file mode 100644
index 0000000000..faf1e044d7
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0001/actual.js
@@ -0,0 +1 @@
+new Button()
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0001/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0001/expected.json
new file mode 100644
index 0000000000..782d5ea7e4
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0001/expected.json
@@ -0,0 +1,80 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "Button"
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0002/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0002/actual.js
new file mode 100644
index 0000000000..94d35b3de1
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0002/actual.js
@@ -0,0 +1 @@
+new new foo
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0002/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0002/expected.json
new file mode 100644
index 0000000000..376081c391
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0002/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "callee": {
+ "type": "NewExpression",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "arguments": []
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0003/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0003/actual.js
new file mode 100644
index 0000000000..dd7e741e59
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0003/actual.js
@@ -0,0 +1 @@
+new new foo()
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0003/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0003/expected.json
new file mode 100644
index 0000000000..5c476aa6cf
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0003/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "callee": {
+ "type": "NewExpression",
+ "start": 4,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "foo"
+ },
+ "arguments": []
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0004/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0004/actual.js
new file mode 100644
index 0000000000..70f5f76c68
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0004/actual.js
@@ -0,0 +1 @@
+new foo().bar()
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0004/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0004/expected.json
new file mode 100644
index 0000000000..1b87993df9
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0004/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "object": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "arguments": []
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "bar"
+ },
+ "computed": false
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0005/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0005/actual.js
new file mode 100644
index 0000000000..970159627a
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0005/actual.js
@@ -0,0 +1 @@
+new foo[bar]
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0005/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0005/expected.json
new file mode 100644
index 0000000000..952d418f50
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0005/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 4,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "bar"
+ },
+ "computed": true
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0006/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0006/actual.js
new file mode 100644
index 0000000000..c8eaa7d3df
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0006/actual.js
@@ -0,0 +1 @@
+new foo.bar()
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0006/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0006/expected.json
new file mode 100644
index 0000000000..7ace856b56
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0006/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "NewExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "bar"
+ },
+ "computed": false
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0007/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0007/actual.js
new file mode 100644
index 0000000000..3cfaa821f0
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0007/actual.js
@@ -0,0 +1 @@
+( new foo).bar()
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json
new file mode 100644
index 0000000000..5e0c9c3c30
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json
@@ -0,0 +1,132 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "object": {
+ "type": "NewExpression",
+ "start": 2,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "foo"
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "bar"
+ },
+ "computed": false
+ },
+ "arguments": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0008/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0008/actual.js
new file mode 100644
index 0000000000..da0f4f336f
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0008/actual.js
@@ -0,0 +1 @@
+foo(bar, baz)
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0008/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0008/expected.json
new file mode 100644
index 0000000000..c20918ced6
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0008/expected.json
@@ -0,0 +1,113 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "foo"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "bar"
+ },
+ {
+ "type": "Identifier",
+ "start": 9,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "baz"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0009/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0009/actual.js
new file mode 100644
index 0000000000..f3004e7a57
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0009/actual.js
@@ -0,0 +1 @@
+( foo )()
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json
new file mode 100644
index 0000000000..2a92530d73
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json
@@ -0,0 +1,84 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "foo",
+ "extra": {
+ "parenthesized": true
+ }
+ },
+ "arguments": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0010/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0010/actual.js
new file mode 100644
index 0000000000..02ad348883
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0010/actual.js
@@ -0,0 +1 @@
+universe.milkyway
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0010/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0010/expected.json
new file mode 100644
index 0000000000..937e364bb2
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0010/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "milkyway"
+ },
+ "computed": false
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0011/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0011/actual.js
new file mode 100644
index 0000000000..aafe7cd7c7
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0011/actual.js
@@ -0,0 +1 @@
+universe.milkyway.solarsystem
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0011/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0011/expected.json
new file mode 100644
index 0000000000..9b9c988c91
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0011/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "milkyway"
+ },
+ "computed": false
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "solarsystem"
+ },
+ "computed": false
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0012/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0012/actual.js
new file mode 100644
index 0000000000..eae277418a
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0012/actual.js
@@ -0,0 +1 @@
+universe.milkyway.solarsystem.Earth
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0012/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0012/expected.json
new file mode 100644
index 0000000000..e160672e6a
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0012/expected.json
@@ -0,0 +1,160 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "milkyway"
+ },
+ "computed": false
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "solarsystem"
+ },
+ "computed": false
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 30,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "name": "Earth"
+ },
+ "computed": false
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0013/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0013/actual.js
new file mode 100644
index 0000000000..3b1db67828
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0013/actual.js
@@ -0,0 +1 @@
+universe[galaxyName, otherUselessName]
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0013/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0013/expected.json
new file mode 100644
index 0000000000..269aad8658
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0013/expected.json
@@ -0,0 +1,129 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "property": {
+ "type": "SequenceExpression",
+ "start": 9,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "expressions": [
+ {
+ "type": "Identifier",
+ "start": 9,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "galaxyName"
+ },
+ {
+ "type": "Identifier",
+ "start": 21,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "name": "otherUselessName"
+ }
+ ]
+ },
+ "computed": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0014/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0014/actual.js
new file mode 100644
index 0000000000..47f9ec6916
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0014/actual.js
@@ -0,0 +1 @@
+universe[galaxyName]
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0014/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0014/expected.json
new file mode 100644
index 0000000000..fd2ad08336
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0014/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "galaxyName"
+ },
+ "computed": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0015/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0015/actual.js
new file mode 100644
index 0000000000..79781fb356
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0015/actual.js
@@ -0,0 +1 @@
+universe[42].galaxies
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json
new file mode 100644
index 0000000000..ec68a20ef6
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json
@@ -0,0 +1,133 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "property": {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ },
+ "computed": true
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "galaxies"
+ },
+ "computed": false
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0016/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0016/actual.js
new file mode 100644
index 0000000000..3d6d662393
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0016/actual.js
@@ -0,0 +1 @@
+universe(42).galaxies
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json
new file mode 100644
index 0000000000..a7a9ccf384
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "object": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "arguments": [
+ {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ ]
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "galaxies"
+ },
+ "computed": false
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0017/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0017/actual.js
new file mode 100644
index 0000000000..76785c5f46
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0017/actual.js
@@ -0,0 +1 @@
+universe(42).galaxies(14, 3, 77).milkyway
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json
new file mode 100644
index 0000000000..c94c04107e
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json
@@ -0,0 +1,243 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "object": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "object": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "arguments": [
+ {
+ "type": "NumberLiteral",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ ]
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "galaxies"
+ },
+ "computed": false
+ },
+ "arguments": [
+ {
+ "type": "NumberLiteral",
+ "start": 22,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "extra": {
+ "rawValue": 14,
+ "raw": "14"
+ },
+ "value": 14
+ },
+ {
+ "type": "NumberLiteral",
+ "start": 26,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ },
+ {
+ "type": "NumberLiteral",
+ "start": 29,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "extra": {
+ "rawValue": 77,
+ "raw": "77"
+ },
+ "value": 77
+ }
+ ]
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "milkyway"
+ },
+ "computed": false
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0018/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0018/actual.js
new file mode 100644
index 0000000000..423bc528eb
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0018/actual.js
@@ -0,0 +1 @@
+earth.asia.Indonesia.prepareForElection(2014)
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json
new file mode 100644
index 0000000000..b7649d92f8
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json
@@ -0,0 +1,198 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "earth"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "asia"
+ },
+ "computed": false
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "Indonesia"
+ },
+ "computed": false
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "name": "prepareForElection"
+ },
+ "computed": false
+ },
+ "arguments": [
+ {
+ "type": "NumberLiteral",
+ "start": 40,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "extra": {
+ "rawValue": 2014,
+ "raw": "2014"
+ },
+ "value": 2014
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0019/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0019/actual.js
new file mode 100644
index 0000000000..1999f5dc40
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0019/actual.js
@@ -0,0 +1 @@
+universe.if
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0019/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0019/expected.json
new file mode 100644
index 0000000000..41129f5624
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0019/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "if"
+ },
+ "computed": false
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0020/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0020/actual.js
new file mode 100644
index 0000000000..5c90c4fefb
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0020/actual.js
@@ -0,0 +1 @@
+universe.true
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0020/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0020/expected.json
new file mode 100644
index 0000000000..b31bc7542a
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0020/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "true"
+ },
+ "computed": false
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0021/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0021/actual.js
new file mode 100644
index 0000000000..5fe9f0397c
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0021/actual.js
@@ -0,0 +1 @@
+universe.false
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0021/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0021/expected.json
new file mode 100644
index 0000000000..5bc538a2b9
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0021/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "false"
+ },
+ "computed": false
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0022/actual.js b/test/fixtures/esprima/expression-left-hand-side/migrated_0022/actual.js
new file mode 100644
index 0000000000..b439c86b98
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0022/actual.js
@@ -0,0 +1 @@
+universe.null
diff --git a/test/fixtures/esprima/expression-left-hand-side/migrated_0022/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0022/expected.json
new file mode 100644
index 0000000000..a8f3caddc1
--- /dev/null
+++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0022/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "universe"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "null"
+ },
+ "computed": false
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-multiplicative/migrated_0000/actual.js b/test/fixtures/esprima/expression-multiplicative/migrated_0000/actual.js
new file mode 100644
index 0000000000..d1a067af67
--- /dev/null
+++ b/test/fixtures/esprima/expression-multiplicative/migrated_0000/actual.js
@@ -0,0 +1 @@
+x * y
diff --git a/test/fixtures/esprima/expression-multiplicative/migrated_0000/expected.json b/test/fixtures/esprima/expression-multiplicative/migrated_0000/expected.json
new file mode 100644
index 0000000000..89022ede9f
--- /dev/null
+++ b/test/fixtures/esprima/expression-multiplicative/migrated_0000/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-multiplicative/migrated_0001/actual.js b/test/fixtures/esprima/expression-multiplicative/migrated_0001/actual.js
new file mode 100644
index 0000000000..02514641d8
--- /dev/null
+++ b/test/fixtures/esprima/expression-multiplicative/migrated_0001/actual.js
@@ -0,0 +1 @@
+x / y
diff --git a/test/fixtures/esprima/expression-multiplicative/migrated_0001/expected.json b/test/fixtures/esprima/expression-multiplicative/migrated_0001/expected.json
new file mode 100644
index 0000000000..8a860dd890
--- /dev/null
+++ b/test/fixtures/esprima/expression-multiplicative/migrated_0001/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "/",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-multiplicative/migrated_0002/actual.js b/test/fixtures/esprima/expression-multiplicative/migrated_0002/actual.js
new file mode 100644
index 0000000000..e5605cc2ca
--- /dev/null
+++ b/test/fixtures/esprima/expression-multiplicative/migrated_0002/actual.js
@@ -0,0 +1 @@
+x % y
diff --git a/test/fixtures/esprima/expression-multiplicative/migrated_0002/expected.json b/test/fixtures/esprima/expression-multiplicative/migrated_0002/expected.json
new file mode 100644
index 0000000000..2887a84d0e
--- /dev/null
+++ b/test/fixtures/esprima/expression-multiplicative/migrated_0002/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "%",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0000/actual.js b/test/fixtures/esprima/expression-postfix/migrated_0000/actual.js
new file mode 100644
index 0000000000..364dc43646
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0000/actual.js
@@ -0,0 +1 @@
+x++
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0000/expected.json b/test/fixtures/esprima/expression-postfix/migrated_0000/expected.json
new file mode 100644
index 0000000000..0712715b16
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0000/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0001/actual.js b/test/fixtures/esprima/expression-postfix/migrated_0001/actual.js
new file mode 100644
index 0000000000..0820536cd8
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0001/actual.js
@@ -0,0 +1 @@
+x--
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0001/expected.json b/test/fixtures/esprima/expression-postfix/migrated_0001/expected.json
new file mode 100644
index 0000000000..c4ea608985
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0001/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "operator": "--",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0002/actual.js b/test/fixtures/esprima/expression-postfix/migrated_0002/actual.js
new file mode 100644
index 0000000000..71a7f25653
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0002/actual.js
@@ -0,0 +1 @@
+eval++
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0002/expected.json b/test/fixtures/esprima/expression-postfix/migrated_0002/expected.json
new file mode 100644
index 0000000000..b1909f3acc
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0002/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0003/actual.js b/test/fixtures/esprima/expression-postfix/migrated_0003/actual.js
new file mode 100644
index 0000000000..798b38e212
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0003/actual.js
@@ -0,0 +1 @@
+eval--
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0003/expected.json b/test/fixtures/esprima/expression-postfix/migrated_0003/expected.json
new file mode 100644
index 0000000000..aaebc648e7
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0003/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "operator": "--",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0004/actual.js b/test/fixtures/esprima/expression-postfix/migrated_0004/actual.js
new file mode 100644
index 0000000000..cd0b1ae75a
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0004/actual.js
@@ -0,0 +1 @@
+arguments++
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0004/expected.json b/test/fixtures/esprima/expression-postfix/migrated_0004/expected.json
new file mode 100644
index 0000000000..bb07286fc5
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0004/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0005/actual.js b/test/fixtures/esprima/expression-postfix/migrated_0005/actual.js
new file mode 100644
index 0000000000..ac1d0470da
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0005/actual.js
@@ -0,0 +1 @@
+arguments--
diff --git a/test/fixtures/esprima/expression-postfix/migrated_0005/expected.json b/test/fixtures/esprima/expression-postfix/migrated_0005/expected.json
new file mode 100644
index 0000000000..5fdbf545d2
--- /dev/null
+++ b/test/fixtures/esprima/expression-postfix/migrated_0005/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "operator": "--",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/expected.json b/test/fixtures/esprima/expression-primary/array/expected.json
new file mode 100644
index 0000000000..10130f3578
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/expected.json
@@ -0,0 +1,32 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "sourceType": "script",
+ "body": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0000.js b/test/fixtures/esprima/expression-primary/array/migrated_0000.js
new file mode 100755
index 0000000000..93edbdf932
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0000.js
@@ -0,0 +1 @@
+x = []
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0001.js b/test/fixtures/esprima/expression-primary/array/migrated_0001.js
new file mode 100755
index 0000000000..bad19c76e0
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0001.js
@@ -0,0 +1 @@
+x = [ ]
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0002.js b/test/fixtures/esprima/expression-primary/array/migrated_0002.js
new file mode 100755
index 0000000000..34a371c58c
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0002.js
@@ -0,0 +1 @@
+x = [ 42 ]
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0003.js b/test/fixtures/esprima/expression-primary/array/migrated_0003.js
new file mode 100755
index 0000000000..4a52d857d6
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0003.js
@@ -0,0 +1 @@
+x = [ 42, ]
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0004.js b/test/fixtures/esprima/expression-primary/array/migrated_0004.js
new file mode 100755
index 0000000000..18ce8c0881
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0004.js
@@ -0,0 +1 @@
+x = [ ,, 42 ]
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0005.js b/test/fixtures/esprima/expression-primary/array/migrated_0005.js
new file mode 100755
index 0000000000..9a2988fad8
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0005.js
@@ -0,0 +1 @@
+x = [ 1, 2, 3, ]
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0006.js b/test/fixtures/esprima/expression-primary/array/migrated_0006.js
new file mode 100755
index 0000000000..9fad480185
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0006.js
@@ -0,0 +1 @@
+x = [ 1, 2,, 3, ]
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0007.js b/test/fixtures/esprima/expression-primary/array/migrated_0007.js
new file mode 100755
index 0000000000..16e202fe27
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0007.js
@@ -0,0 +1 @@
+日本語 = []
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0008.source.js b/test/fixtures/esprima/expression-primary/array/migrated_0008.source.js
new file mode 100755
index 0000000000..f0f44705bf
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0008.source.js
@@ -0,0 +1 @@
+var source = 'T\u203F = []';
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0009.source.js b/test/fixtures/esprima/expression-primary/array/migrated_0009.source.js
new file mode 100755
index 0000000000..e2eb52f9c7
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0009.source.js
@@ -0,0 +1 @@
+var source = 'T\u200C = []';
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0010.source.js b/test/fixtures/esprima/expression-primary/array/migrated_0010.source.js
new file mode 100755
index 0000000000..bafe63b052
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0010.source.js
@@ -0,0 +1 @@
+var source = 'T\u200D = []';
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0011.source.js b/test/fixtures/esprima/expression-primary/array/migrated_0011.source.js
new file mode 100755
index 0000000000..307b0667e7
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0011.source.js
@@ -0,0 +1 @@
+var source = '\u2163\u2161 = []';
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/array/migrated_0012.source.js b/test/fixtures/esprima/expression-primary/array/migrated_0012.source.js
new file mode 100755
index 0000000000..b24f8e1c82
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/array/migrated_0012.source.js
@@ -0,0 +1 @@
+var source = '\u2163\u2161\u200A=\u2009[]';
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/expected.json b/test/fixtures/esprima/expression-primary/literal/expected.json
new file mode 100644
index 0000000000..10130f3578
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/expected.json
@@ -0,0 +1,32 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "sourceType": "script",
+ "body": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0000.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0000.js
new file mode 100755
index 0000000000..c227083464
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0000.js
@@ -0,0 +1 @@
+0
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0001.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0001.js
new file mode 100755
index 0000000000..f70d7bba4a
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0001.js
@@ -0,0 +1 @@
+42
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0002.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0002.js
new file mode 100755
index 0000000000..e440e5c842
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0002.js
@@ -0,0 +1 @@
+3
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0003.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0003.js
new file mode 100755
index 0000000000..7813681f5b
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0003.js
@@ -0,0 +1 @@
+5
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0004.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0004.js
new file mode 100755
index 0000000000..be03e1f60c
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0004.js
@@ -0,0 +1 @@
+.14
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0005.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0005.js
new file mode 100755
index 0000000000..2c0cac55e9
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0005.js
@@ -0,0 +1 @@
+3.14159
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0006.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0006.js
new file mode 100755
index 0000000000..f5b274b29f
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0006.js
@@ -0,0 +1 @@
+6.02214179e+23
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0007.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0007.js
new file mode 100755
index 0000000000..76ed586cf9
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0007.js
@@ -0,0 +1 @@
+1.492417830e-10
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0008.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0008.js
new file mode 100755
index 0000000000..4eb9959a2f
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0008.js
@@ -0,0 +1 @@
+0x0
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0009.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0009.js
new file mode 100755
index 0000000000..920f1df47e
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0009.js
@@ -0,0 +1 @@
+0x0;
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0010.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0010.js
new file mode 100755
index 0000000000..fc205a7af3
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0010.js
@@ -0,0 +1 @@
+0e+100
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0011.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0011.js
new file mode 100755
index 0000000000..09ef70253b
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0011.js
@@ -0,0 +1 @@
+0e+100
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0012.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0012.js
new file mode 100755
index 0000000000..2638b79541
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0012.js
@@ -0,0 +1 @@
+0xabc
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0013.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0013.js
new file mode 100755
index 0000000000..f52a51eac0
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0013.js
@@ -0,0 +1 @@
+0xdef
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0014.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0014.js
new file mode 100755
index 0000000000..64239bc1d3
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0014.js
@@ -0,0 +1 @@
+0X1A
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0015.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0015.js
new file mode 100755
index 0000000000..1543d40816
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0015.js
@@ -0,0 +1 @@
+0x10
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0016.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0016.js
new file mode 100755
index 0000000000..b4df9e41e6
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0016.js
@@ -0,0 +1 @@
+0x100
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0017.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0017.js
new file mode 100755
index 0000000000..0c023f5103
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0017.js
@@ -0,0 +1 @@
+0X04
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0018.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0018.js
new file mode 100755
index 0000000000..b08e32771f
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0018.js
@@ -0,0 +1 @@
+02
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0019.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0019.js
new file mode 100755
index 0000000000..108d4a6efa
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0019.js
@@ -0,0 +1 @@
+012
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0020.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0020.js
new file mode 100755
index 0000000000..58aba07363
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0020.js
@@ -0,0 +1 @@
+0012
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0021.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0021.js
new file mode 100755
index 0000000000..7d4defd631
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0021.js
@@ -0,0 +1 @@
+08
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0022.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0022.js
new file mode 100755
index 0000000000..63e484e2ed
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0022.js
@@ -0,0 +1 @@
+0008
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0023.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0023.js
new file mode 100755
index 0000000000..aa2f0b2695
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0023.js
@@ -0,0 +1 @@
+09
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0024.js b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0024.js
new file mode 100755
index 0000000000..54bb538e84
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/numeric/migrated_0024.js
@@ -0,0 +1 @@
+09.5
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0000.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0000.js
new file mode 100755
index 0000000000..abc222ef6c
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0000.js
@@ -0,0 +1 @@
+/p/;
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0001.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0001.js
new file mode 100755
index 0000000000..3252cdd9a7
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0001.js
@@ -0,0 +1 @@
+[/q/]
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0002.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0002.js
new file mode 100755
index 0000000000..6bb56b4469
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0002.js
@@ -0,0 +1 @@
+var x = /[a-z]/i
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0003.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0003.js
new file mode 100755
index 0000000000..db1b90a161
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0003.js
@@ -0,0 +1 @@
+var x = /[a-z]/y
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0004.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0004.js
new file mode 100755
index 0000000000..2c1de8e27e
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0004.js
@@ -0,0 +1 @@
+var x = /[a-z]/u
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0005.source.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0005.source.js
new file mode 100755
index 0000000000..b2b646e23e
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0005.source.js
@@ -0,0 +1 @@
+var source = 'var x = /[\\u{0000000000000061}-\\u{7A}]/u';
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0006.failure.json b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0006.failure.json
new file mode 100755
index 0000000000..55cbc7a399
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0006.failure.json
@@ -0,0 +1,6 @@
+{
+ "index": 21,
+ "lineNumber": 1,
+ "column": 22,
+ "message": "Error: Line 1: Invalid regular expression"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0006.source.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0006.source.js
new file mode 100755
index 0000000000..964850a64e
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0006.source.js
@@ -0,0 +1 @@
+var source = 'var x = /\\u{110000}/u';
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0007.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0007.js
new file mode 100755
index 0000000000..9381588264
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0007.js
@@ -0,0 +1 @@
+var x = /[x-z]/i
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0008.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0008.js
new file mode 100755
index 0000000000..71e179d728
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0008.js
@@ -0,0 +1 @@
+var x = /[a-c]/i
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0009.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0009.js
new file mode 100755
index 0000000000..cc13baaedb
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0009.js
@@ -0,0 +1 @@
+var x = /[P QR]/i
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0010.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0010.js
new file mode 100755
index 0000000000..de30ee8d78
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0010.js
@@ -0,0 +1 @@
+var x = /[\]/]/
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0011.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0011.js
new file mode 100755
index 0000000000..dec7c26546
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0011.js
@@ -0,0 +1 @@
+var x = /foo\/bar/
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0012.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0012.js
new file mode 100755
index 0000000000..3778fcff9e
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0012.js
@@ -0,0 +1 @@
+var x = /=([^=\s])+/g
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0013.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0013.js
new file mode 100755
index 0000000000..7bb9d02a44
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0013.js
@@ -0,0 +1 @@
+var x = /42/g.test
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-4-hex.failure.json b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-4-hex.failure.json
new file mode 100755
index 0000000000..9bfbe69a02
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-4-hex.failure.json
@@ -0,0 +1,6 @@
+{
+ "index": 21,
+ "lineNumber": 1,
+ "column": 22,
+ "message": "Error: Line 1: Invalid regular expression"
+}
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-4-hex.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-4-hex.js
new file mode 100755
index 0000000000..3d8b6d0439
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-4-hex.js
@@ -0,0 +1 @@
+var x = /[\u0063-b]/u;
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-var-hex.failure.json b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-var-hex.failure.json
new file mode 100755
index 0000000000..9bfbe69a02
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-var-hex.failure.json
@@ -0,0 +1,6 @@
+{
+ "index": 21,
+ "lineNumber": 1,
+ "column": 22,
+ "message": "Error: Line 1: Invalid regular expression"
+}
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-var-hex.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-var-hex.js
new file mode 100755
index 0000000000..34e1615cf2
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-var-hex.js
@@ -0,0 +1 @@
+var x = /[\u{63}-b]/u;
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-surrogate-pair.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-surrogate-pair.js
new file mode 100755
index 0000000000..b0c93c88cd
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-surrogate-pair.js
@@ -0,0 +1 @@
+var x = /[\uD834\uDF06-\uD834\uDF08a-z]/u
diff --git a/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-valid-range.js b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-valid-range.js
new file mode 100755
index 0000000000..82055ad165
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-valid-range.js
@@ -0,0 +1 @@
+var x = /[\u{61}-b][\u0061-b][a-\u{62}][a-\u0062]\u{1ffff}/u;
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0000.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0000.js
new file mode 100755
index 0000000000..5638d8ba20
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0000.js
@@ -0,0 +1 @@
+"Hello"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0001.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0001.js
new file mode 100755
index 0000000000..5df7cc4df6
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0001.js
@@ -0,0 +1 @@
+"\n\r\t\v\b\f\\\'\"\0"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0002.source.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0002.source.js
new file mode 100755
index 0000000000..0447afbd6f
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0002.source.js
@@ -0,0 +1 @@
+var source = '"\\u0061"';
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0003.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0003.js
new file mode 100755
index 0000000000..e2900ca237
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0003.js
@@ -0,0 +1 @@
+"\x61"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0006.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0006.js
new file mode 100755
index 0000000000..0b0d9763bc
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0006.js
@@ -0,0 +1 @@
+"Hello\nworld"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0007.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0007.js
new file mode 100755
index 0000000000..7e5e4d1982
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0007.js
@@ -0,0 +1,2 @@
+"Hello\
+world"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0008.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0008.js
new file mode 100755
index 0000000000..09a19f43fe
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0008.js
@@ -0,0 +1 @@
+"Hello\02World"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0009.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0009.js
new file mode 100755
index 0000000000..b0f991045e
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0009.js
@@ -0,0 +1 @@
+"Hello\012World"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0010.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0010.js
new file mode 100755
index 0000000000..a0768cd433
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0010.js
@@ -0,0 +1 @@
+"Hello\122World"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0011.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0011.js
new file mode 100755
index 0000000000..7bf843297c
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0011.js
@@ -0,0 +1 @@
+"Hello\0122World"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0012.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0012.js
new file mode 100755
index 0000000000..bb1e3cbb63
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0012.js
@@ -0,0 +1 @@
+"Hello\312World"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0013.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0013.js
new file mode 100755
index 0000000000..271e2dedac
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0013.js
@@ -0,0 +1 @@
+"Hello\412World"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0015.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0015.js
new file mode 100755
index 0000000000..864a61471d
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0015.js
@@ -0,0 +1 @@
+"Hello\712World"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0016.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0016.js
new file mode 100755
index 0000000000..8e8574da03
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0016.js
@@ -0,0 +1 @@
+"Hello\0World"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0017.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0017.js
new file mode 100755
index 0000000000..f9ac49bca7
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0017.js
@@ -0,0 +1,2 @@
+"Hello\
+world"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/literal/string/migrated_0018.js b/test/fixtures/esprima/expression-primary/literal/string/migrated_0018.js
new file mode 100755
index 0000000000..d667033539
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/literal/string/migrated_0018.js
@@ -0,0 +1 @@
+"Hello\1World"
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/expected.json b/test/fixtures/esprima/expression-primary/object/expected.json
new file mode 100644
index 0000000000..10130f3578
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/expected.json
@@ -0,0 +1,32 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "sourceType": "script",
+ "body": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0000.js b/test/fixtures/esprima/expression-primary/object/migrated_0000.js
new file mode 100755
index 0000000000..ad9234753c
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0000.js
@@ -0,0 +1 @@
+x = {}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0001.js b/test/fixtures/esprima/expression-primary/object/migrated_0001.js
new file mode 100755
index 0000000000..e2070b1349
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0001.js
@@ -0,0 +1 @@
+x = { }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0002.js b/test/fixtures/esprima/expression-primary/object/migrated_0002.js
new file mode 100755
index 0000000000..ac27b07c1f
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0002.js
@@ -0,0 +1 @@
+x = { answer: 42 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0003.js b/test/fixtures/esprima/expression-primary/object/migrated_0003.js
new file mode 100755
index 0000000000..eb6c39e461
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0003.js
@@ -0,0 +1 @@
+x = { if: 42 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0004.js b/test/fixtures/esprima/expression-primary/object/migrated_0004.js
new file mode 100755
index 0000000000..cc13060a89
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0004.js
@@ -0,0 +1 @@
+x = { true: 42 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0005.js b/test/fixtures/esprima/expression-primary/object/migrated_0005.js
new file mode 100755
index 0000000000..232f4d608a
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0005.js
@@ -0,0 +1 @@
+x = { false: 42 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0006.js b/test/fixtures/esprima/expression-primary/object/migrated_0006.js
new file mode 100755
index 0000000000..73fedb55da
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0006.js
@@ -0,0 +1 @@
+x = { null: 42 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0007.js b/test/fixtures/esprima/expression-primary/object/migrated_0007.js
new file mode 100755
index 0000000000..080fc0eb69
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0007.js
@@ -0,0 +1 @@
+x = { "answer": 42 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0008.js b/test/fixtures/esprima/expression-primary/object/migrated_0008.js
new file mode 100755
index 0000000000..27dc99aa13
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0008.js
@@ -0,0 +1 @@
+x = { x: 1, x: 2 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0009.js b/test/fixtures/esprima/expression-primary/object/migrated_0009.js
new file mode 100755
index 0000000000..6184558260
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0009.js
@@ -0,0 +1 @@
+x = { get width() { return m_width } }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0010.js b/test/fixtures/esprima/expression-primary/object/migrated_0010.js
new file mode 100755
index 0000000000..31858315e9
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0010.js
@@ -0,0 +1 @@
+x = { get undef() {} }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0011.js b/test/fixtures/esprima/expression-primary/object/migrated_0011.js
new file mode 100755
index 0000000000..d36a62233b
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0011.js
@@ -0,0 +1 @@
+x = { get if() {} }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0012.js b/test/fixtures/esprima/expression-primary/object/migrated_0012.js
new file mode 100755
index 0000000000..d1eebe34eb
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0012.js
@@ -0,0 +1 @@
+x = { get true() {} }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0013.js b/test/fixtures/esprima/expression-primary/object/migrated_0013.js
new file mode 100755
index 0000000000..bfdd86e7bc
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0013.js
@@ -0,0 +1 @@
+x = { get false() {} }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0014.js b/test/fixtures/esprima/expression-primary/object/migrated_0014.js
new file mode 100755
index 0000000000..11f3416e4d
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0014.js
@@ -0,0 +1 @@
+x = { get null() {} }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0015.js b/test/fixtures/esprima/expression-primary/object/migrated_0015.js
new file mode 100755
index 0000000000..6b2adc2768
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0015.js
@@ -0,0 +1 @@
+x = { get "undef"() {} }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0016.js b/test/fixtures/esprima/expression-primary/object/migrated_0016.js
new file mode 100755
index 0000000000..a4b31f7f4b
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0016.js
@@ -0,0 +1 @@
+x = { get 10() {} }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0017.js b/test/fixtures/esprima/expression-primary/object/migrated_0017.js
new file mode 100755
index 0000000000..195d9af705
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0017.js
@@ -0,0 +1 @@
+x = { set width(w) { m_width = w } }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0018.js b/test/fixtures/esprima/expression-primary/object/migrated_0018.js
new file mode 100755
index 0000000000..5a84a53efe
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0018.js
@@ -0,0 +1 @@
+x = { set if(w) { m_if = w } }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0019.js b/test/fixtures/esprima/expression-primary/object/migrated_0019.js
new file mode 100755
index 0000000000..9a2f22a04c
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0019.js
@@ -0,0 +1 @@
+x = { set true(w) { m_true = w } }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0020.js b/test/fixtures/esprima/expression-primary/object/migrated_0020.js
new file mode 100755
index 0000000000..8689324d5f
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0020.js
@@ -0,0 +1 @@
+x = { set false(w) { m_false = w } }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0021.js b/test/fixtures/esprima/expression-primary/object/migrated_0021.js
new file mode 100755
index 0000000000..2694a883bd
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0021.js
@@ -0,0 +1 @@
+x = { set null(w) { m_null = w } }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0022.js b/test/fixtures/esprima/expression-primary/object/migrated_0022.js
new file mode 100755
index 0000000000..46712ca95a
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0022.js
@@ -0,0 +1 @@
+x = { set "null"(w) { m_null = w } }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0023.js b/test/fixtures/esprima/expression-primary/object/migrated_0023.js
new file mode 100755
index 0000000000..c5e8300a63
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0023.js
@@ -0,0 +1 @@
+x = { set 10(w) { m_null = w } }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0024.js b/test/fixtures/esprima/expression-primary/object/migrated_0024.js
new file mode 100755
index 0000000000..12174c643f
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0024.js
@@ -0,0 +1 @@
+x = { get: 42 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0025.js b/test/fixtures/esprima/expression-primary/object/migrated_0025.js
new file mode 100755
index 0000000000..3750d76009
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0025.js
@@ -0,0 +1 @@
+x = { set: 43 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0026.js b/test/fixtures/esprima/expression-primary/object/migrated_0026.js
new file mode 100755
index 0000000000..7ac6c98aba
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0026.js
@@ -0,0 +1 @@
+x = { __proto__: 2 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0027.js b/test/fixtures/esprima/expression-primary/object/migrated_0027.js
new file mode 100755
index 0000000000..47f74f2edd
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0027.js
@@ -0,0 +1 @@
+x = {"__proto__": 2 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0028.js b/test/fixtures/esprima/expression-primary/object/migrated_0028.js
new file mode 100755
index 0000000000..32bbc3d6fb
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0028.js
@@ -0,0 +1 @@
+x = { get width() { return m_width }, set width(width) { m_width = width; } }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0029.js b/test/fixtures/esprima/expression-primary/object/migrated_0029.js
new file mode 100755
index 0000000000..485ec58cc1
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0029.js
@@ -0,0 +1 @@
+({ get i() { }, i: 42 })
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0030.js b/test/fixtures/esprima/expression-primary/object/migrated_0030.js
new file mode 100755
index 0000000000..77c8fde597
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0030.js
@@ -0,0 +1 @@
+"use strict";x={y:1,y:1}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0031.js b/test/fixtures/esprima/expression-primary/object/migrated_0031.js
new file mode 100755
index 0000000000..eefc56adf8
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0031.js
@@ -0,0 +1 @@
+"use strict"; var x = { get i() {}, get i() {} }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0032.js b/test/fixtures/esprima/expression-primary/object/migrated_0032.js
new file mode 100755
index 0000000000..74514c2863
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0032.js
@@ -0,0 +1 @@
+"use strict"; var x = { i: 42, get i() {} }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0033.js b/test/fixtures/esprima/expression-primary/object/migrated_0033.js
new file mode 100755
index 0000000000..7e54c3ecd4
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0033.js
@@ -0,0 +1 @@
+"use strict"; var x = { set i(x) {}, i: 42 }
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0034.js b/test/fixtures/esprima/expression-primary/object/migrated_0034.js
new file mode 100755
index 0000000000..dc29fd9df0
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0034.js
@@ -0,0 +1 @@
+({[a](){}})
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0035.js b/test/fixtures/esprima/expression-primary/object/migrated_0035.js
new file mode 100755
index 0000000000..1f56c40c66
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0035.js
@@ -0,0 +1 @@
+({[a]:()=>{}})
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0036.js b/test/fixtures/esprima/expression-primary/object/migrated_0036.js
new file mode 100755
index 0000000000..a086e035da
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0036.js
@@ -0,0 +1 @@
+({["__proto__"]:0, ["__proto__"]:0})
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0037.js b/test/fixtures/esprima/expression-primary/object/migrated_0037.js
new file mode 100755
index 0000000000..5333738e27
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0037.js
@@ -0,0 +1 @@
+({"[": 42})
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/object/migrated_0038.js b/test/fixtures/esprima/expression-primary/object/migrated_0038.js
new file mode 100755
index 0000000000..1f93bdbc7e
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/object/migrated_0038.js
@@ -0,0 +1 @@
+({set x(a=0){}})
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/other/expected.json b/test/fixtures/esprima/expression-primary/other/expected.json
new file mode 100644
index 0000000000..10130f3578
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/other/expected.json
@@ -0,0 +1,32 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "sourceType": "script",
+ "body": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-primary/other/migrated_0000.js b/test/fixtures/esprima/expression-primary/other/migrated_0000.js
new file mode 100755
index 0000000000..9ecf3cf1d5
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/other/migrated_0000.js
@@ -0,0 +1 @@
+this
diff --git a/test/fixtures/esprima/expression-primary/other/migrated_0001.js b/test/fixtures/esprima/expression-primary/other/migrated_0001.js
new file mode 100755
index 0000000000..19765bd501
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/other/migrated_0001.js
@@ -0,0 +1 @@
+null
diff --git a/test/fixtures/esprima/expression-primary/other/migrated_0002.js b/test/fixtures/esprima/expression-primary/other/migrated_0002.js
new file mode 100755
index 0000000000..aa5dcabcca
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/other/migrated_0002.js
@@ -0,0 +1,3 @@
+
+ 42
+
diff --git a/test/fixtures/esprima/expression-primary/other/migrated_0003.js b/test/fixtures/esprima/expression-primary/other/migrated_0003.js
new file mode 100755
index 0000000000..7000f9b764
--- /dev/null
+++ b/test/fixtures/esprima/expression-primary/other/migrated_0003.js
@@ -0,0 +1 @@
+(1 + 2 ) * 3
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-relational/migrated_0000/actual.js b/test/fixtures/esprima/expression-relational/migrated_0000/actual.js
new file mode 100644
index 0000000000..a4309450ff
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0000/actual.js
@@ -0,0 +1 @@
+x < y
diff --git a/test/fixtures/esprima/expression-relational/migrated_0000/expected.json b/test/fixtures/esprima/expression-relational/migrated_0000/expected.json
new file mode 100644
index 0000000000..da2300c3ba
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0000/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-relational/migrated_0001/actual.js b/test/fixtures/esprima/expression-relational/migrated_0001/actual.js
new file mode 100644
index 0000000000..4cdc8cdbb2
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0001/actual.js
@@ -0,0 +1 @@
+x > y
diff --git a/test/fixtures/esprima/expression-relational/migrated_0001/expected.json b/test/fixtures/esprima/expression-relational/migrated_0001/expected.json
new file mode 100644
index 0000000000..d036898e8d
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0001/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": ">",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-relational/migrated_0002/actual.js b/test/fixtures/esprima/expression-relational/migrated_0002/actual.js
new file mode 100644
index 0000000000..da883403b4
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0002/actual.js
@@ -0,0 +1 @@
+x <= y
diff --git a/test/fixtures/esprima/expression-relational/migrated_0002/expected.json b/test/fixtures/esprima/expression-relational/migrated_0002/expected.json
new file mode 100644
index 0000000000..21272df967
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0002/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "<=",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-relational/migrated_0003/actual.js b/test/fixtures/esprima/expression-relational/migrated_0003/actual.js
new file mode 100644
index 0000000000..a64436af47
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0003/actual.js
@@ -0,0 +1 @@
+x >= y
diff --git a/test/fixtures/esprima/expression-relational/migrated_0003/expected.json b/test/fixtures/esprima/expression-relational/migrated_0003/expected.json
new file mode 100644
index 0000000000..4eba25fa96
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0003/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": ">=",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-relational/migrated_0004/actual.js b/test/fixtures/esprima/expression-relational/migrated_0004/actual.js
new file mode 100644
index 0000000000..15f21b7b63
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0004/actual.js
@@ -0,0 +1 @@
+x in y
diff --git a/test/fixtures/esprima/expression-relational/migrated_0004/expected.json b/test/fixtures/esprima/expression-relational/migrated_0004/expected.json
new file mode 100644
index 0000000000..179ec5032f
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0004/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "in",
+ "right": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-relational/migrated_0005/actual.js b/test/fixtures/esprima/expression-relational/migrated_0005/actual.js
new file mode 100644
index 0000000000..ce7d945120
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0005/actual.js
@@ -0,0 +1 @@
+x instanceof y
diff --git a/test/fixtures/esprima/expression-relational/migrated_0005/expected.json b/test/fixtures/esprima/expression-relational/migrated_0005/expected.json
new file mode 100644
index 0000000000..8edd71168c
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0005/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "instanceof",
+ "right": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-relational/migrated_0006/actual.js b/test/fixtures/esprima/expression-relational/migrated_0006/actual.js
new file mode 100644
index 0000000000..aad496bf6a
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0006/actual.js
@@ -0,0 +1 @@
+x < y < z
diff --git a/test/fixtures/esprima/expression-relational/migrated_0006/expected.json b/test/fixtures/esprima/expression-relational/migrated_0006/expected.json
new file mode 100644
index 0000000000..855baa45d7
--- /dev/null
+++ b/test/fixtures/esprima/expression-relational/migrated_0006/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "left": {
+ "type": "BinaryExpression",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "y"
+ }
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0000/actual.js b/test/fixtures/esprima/expression-unary/migrated_0000/actual.js
new file mode 100644
index 0000000000..e4238dffdf
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0000/actual.js
@@ -0,0 +1 @@
+++x
diff --git a/test/fixtures/esprima/expression-unary/migrated_0000/expected.json b/test/fixtures/esprima/expression-unary/migrated_0000/expected.json
new file mode 100644
index 0000000000..b8e60e420d
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0000/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "operator": "++",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0001/actual.js b/test/fixtures/esprima/expression-unary/migrated_0001/actual.js
new file mode 100644
index 0000000000..acb2c9ff3f
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0001/actual.js
@@ -0,0 +1 @@
+--x
diff --git a/test/fixtures/esprima/expression-unary/migrated_0001/expected.json b/test/fixtures/esprima/expression-unary/migrated_0001/expected.json
new file mode 100644
index 0000000000..74d0f506ec
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0001/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "operator": "--",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0002/actual.js b/test/fixtures/esprima/expression-unary/migrated_0002/actual.js
new file mode 100644
index 0000000000..45adb9d186
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0002/actual.js
@@ -0,0 +1 @@
+++eval
diff --git a/test/fixtures/esprima/expression-unary/migrated_0002/expected.json b/test/fixtures/esprima/expression-unary/migrated_0002/expected.json
new file mode 100644
index 0000000000..892974799e
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0002/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "operator": "++",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0003/actual.js b/test/fixtures/esprima/expression-unary/migrated_0003/actual.js
new file mode 100644
index 0000000000..09a7ca55ce
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0003/actual.js
@@ -0,0 +1 @@
+--eval
diff --git a/test/fixtures/esprima/expression-unary/migrated_0003/expected.json b/test/fixtures/esprima/expression-unary/migrated_0003/expected.json
new file mode 100644
index 0000000000..f82908bc2b
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0003/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "operator": "--",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0004/actual.js b/test/fixtures/esprima/expression-unary/migrated_0004/actual.js
new file mode 100644
index 0000000000..2507513936
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0004/actual.js
@@ -0,0 +1 @@
+++arguments
diff --git a/test/fixtures/esprima/expression-unary/migrated_0004/expected.json b/test/fixtures/esprima/expression-unary/migrated_0004/expected.json
new file mode 100644
index 0000000000..e190c488dd
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0004/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "operator": "++",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0005/actual.js b/test/fixtures/esprima/expression-unary/migrated_0005/actual.js
new file mode 100644
index 0000000000..0108538d3d
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0005/actual.js
@@ -0,0 +1 @@
+--arguments
diff --git a/test/fixtures/esprima/expression-unary/migrated_0005/expected.json b/test/fixtures/esprima/expression-unary/migrated_0005/expected.json
new file mode 100644
index 0000000000..8451361753
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0005/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "operator": "--",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0006/actual.js b/test/fixtures/esprima/expression-unary/migrated_0006/actual.js
new file mode 100644
index 0000000000..0f31a64603
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0006/actual.js
@@ -0,0 +1 @@
++x
diff --git a/test/fixtures/esprima/expression-unary/migrated_0006/expected.json b/test/fixtures/esprima/expression-unary/migrated_0006/expected.json
new file mode 100644
index 0000000000..62ee624c4c
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0006/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "expression": {
+ "type": "UnaryExpression",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "operator": "+",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0007/actual.js b/test/fixtures/esprima/expression-unary/migrated_0007/actual.js
new file mode 100644
index 0000000000..670c7b14af
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0007/actual.js
@@ -0,0 +1 @@
+-x
diff --git a/test/fixtures/esprima/expression-unary/migrated_0007/expected.json b/test/fixtures/esprima/expression-unary/migrated_0007/expected.json
new file mode 100644
index 0000000000..4b614da625
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0007/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "expression": {
+ "type": "UnaryExpression",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "operator": "-",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0008/actual.js b/test/fixtures/esprima/expression-unary/migrated_0008/actual.js
new file mode 100644
index 0000000000..d5b13ed838
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0008/actual.js
@@ -0,0 +1 @@
+~x
diff --git a/test/fixtures/esprima/expression-unary/migrated_0008/expected.json b/test/fixtures/esprima/expression-unary/migrated_0008/expected.json
new file mode 100644
index 0000000000..326a3d6c51
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0008/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "expression": {
+ "type": "UnaryExpression",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "operator": "~",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0009/actual.js b/test/fixtures/esprima/expression-unary/migrated_0009/actual.js
new file mode 100644
index 0000000000..d1b14d778f
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0009/actual.js
@@ -0,0 +1 @@
+!x
diff --git a/test/fixtures/esprima/expression-unary/migrated_0009/expected.json b/test/fixtures/esprima/expression-unary/migrated_0009/expected.json
new file mode 100644
index 0000000000..5db05c771f
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0009/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "expression": {
+ "type": "UnaryExpression",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "operator": "!",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 1,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0010/actual.js b/test/fixtures/esprima/expression-unary/migrated_0010/actual.js
new file mode 100644
index 0000000000..6bba139bc6
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0010/actual.js
@@ -0,0 +1 @@
+void x
diff --git a/test/fixtures/esprima/expression-unary/migrated_0010/expected.json b/test/fixtures/esprima/expression-unary/migrated_0010/expected.json
new file mode 100644
index 0000000000..776ed71df2
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0010/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "UnaryExpression",
+ "start": 0,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "operator": "void",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0011/actual.js b/test/fixtures/esprima/expression-unary/migrated_0011/actual.js
new file mode 100644
index 0000000000..ebeb0cb0fa
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0011/actual.js
@@ -0,0 +1 @@
+delete x
diff --git a/test/fixtures/esprima/expression-unary/migrated_0011/expected.json b/test/fixtures/esprima/expression-unary/migrated_0011/expected.json
new file mode 100644
index 0000000000..f5edc45759
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0011/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "expression": {
+ "type": "UnaryExpression",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "operator": "delete",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/expression-unary/migrated_0012/actual.js b/test/fixtures/esprima/expression-unary/migrated_0012/actual.js
new file mode 100644
index 0000000000..e18eec452d
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0012/actual.js
@@ -0,0 +1 @@
+typeof x
diff --git a/test/fixtures/esprima/expression-unary/migrated_0012/expected.json b/test/fixtures/esprima/expression-unary/migrated_0012/expected.json
new file mode 100644
index 0000000000..137dc642bc
--- /dev/null
+++ b/test/fixtures/esprima/expression-unary/migrated_0012/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "expression": {
+ "type": "UnaryExpression",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "operator": "typeof",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "x"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.GH-1106-09/actual.js b/test/fixtures/esprima/invalid-syntax/.GH-1106-09/actual.js
new file mode 100644
index 0000000000..a29592d0ff
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.GH-1106-09/actual.js
@@ -0,0 +1 @@
+"\9";
diff --git a/test/fixtures/esprima/invalid-syntax/.GH-1106-09/expected.json b/test/fixtures/esprima/invalid-syntax/.GH-1106-09/expected.json
new file mode 100644
index 0000000000..0d183a7bf6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.GH-1106-09/expected.json
@@ -0,0 +1,66 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "value": "9",
+ "rawValue": "9",
+ "raw": "\"\\9\""
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.GH-1106-09/options.json b/test/fixtures/esprima/invalid-syntax/.GH-1106-09/options.json
new file mode 100644
index 0000000000..9f7910a413
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.GH-1106-09/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0033/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0033/actual.js
new file mode 100644
index 0000000000..0faf8dc92a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0033/actual.js
@@ -0,0 +1 @@
+var source = 'x\\u005c';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0033/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0033/expected.json
new file mode 100644
index 0000000000..f4fe7d7ce4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0033/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "value": "x\\u005c",
+ "rawValue": "x\\u005c",
+ "raw": "'x\\\\u005c'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0033/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0033/options.json
new file mode 100644
index 0000000000..65ef4a184a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0033/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:8)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0034/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0034/actual.js
new file mode 100644
index 0000000000..ac96b78354
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0034/actual.js
@@ -0,0 +1 @@
+var source = 'x\\u002a';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0034/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0034/expected.json
new file mode 100644
index 0000000000..bc71c475ce
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0034/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "value": "x\\u002a",
+ "rawValue": "x\\u002a",
+ "raw": "'x\\\\u002a'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0034/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0034/options.json
new file mode 100644
index 0000000000..65ef4a184a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0034/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:8)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0035/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0035/actual.js
new file mode 100644
index 0000000000..75d51a0f40
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0035/actual.js
@@ -0,0 +1 @@
+var x = /(s/g
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0035/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0035/expected.json
new file mode 100644
index 0000000000..798f613862
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0035/expected.json
@@ -0,0 +1,102 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 8,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "raw": "/(s/g",
+ "regex": {
+ "pattern": "(s",
+ "flags": "g"
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0035/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0035/options.json
new file mode 100644
index 0000000000..f8ff26aba2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0035/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Error parsing regular expression: Invalid regular expression: /(s/: Unterminated group (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0036/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0036/actual.js
new file mode 100644
index 0000000000..e7f145a8d0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0036/actual.js
@@ -0,0 +1 @@
+var source = 'a\\u';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0036/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0036/expected.json
new file mode 100644
index 0000000000..ee388c0ff8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0036/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "value": "a\\u",
+ "rawValue": "a\\u",
+ "raw": "'a\\\\u'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0036/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0036/options.json
new file mode 100644
index 0000000000..9f7910a413
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0036/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0037/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0037/actual.js
new file mode 100644
index 0000000000..5ced27a43a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0037/actual.js
@@ -0,0 +1 @@
+var source = '\\ua';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0037/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0037/expected.json
new file mode 100644
index 0000000000..1e4947ba6c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0037/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "value": "\\ua",
+ "rawValue": "\\ua",
+ "raw": "'\\\\ua'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0037/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0037/options.json
new file mode 100644
index 0000000000..9f7910a413
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0037/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0041/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0041/actual.js
new file mode 100644
index 0000000000..21543eba12
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0041/actual.js
@@ -0,0 +1 @@
+var source = 'var x = /[a-z]/\\ux';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0041/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0041/expected.json
new file mode 100644
index 0000000000..432370bc2e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0041/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": "var x = /[a-z]/\\ux",
+ "rawValue": "var x = /[a-z]/\\ux",
+ "raw": "'var x = /[a-z]/\\\\ux'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0041/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0041/options.json
new file mode 100644
index 0000000000..2a73699bc2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0041/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0042/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0042/actual.js
new file mode 100644
index 0000000000..a7b0d9a465
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0042/actual.js
@@ -0,0 +1 @@
+var source = 'var x = /[a-z\n]/\\ux';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0042/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0042/expected.json
new file mode 100644
index 0000000000..88d96a096a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0042/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "value": "var x = /[a-z\n]/\\ux",
+ "rawValue": "var x = /[a-z\n]/\\ux",
+ "raw": "'var x = /[a-z\\n]/\\\\ux'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0042/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0042/options.json
new file mode 100644
index 0000000000..7ca1e1ffbb
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0042/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0043/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0043/actual.js
new file mode 100644
index 0000000000..42552d4807
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0043/actual.js
@@ -0,0 +1 @@
+var source = 'var x = /[a-z]/\\\\ux';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0043/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0043/expected.json
new file mode 100644
index 0000000000..5dccf2df66
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0043/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "value": "var x = /[a-z]/\\\\ux",
+ "rawValue": "var x = /[a-z]/\\\\ux",
+ "raw": "'var x = /[a-z]/\\\\\\\\ux'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0043/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0043/options.json
new file mode 100644
index 0000000000..8bb9a5f99b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0043/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:17)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0044/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0044/actual.js
new file mode 100644
index 0000000000..eabe2cb40a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0044/actual.js
@@ -0,0 +1 @@
+var source = 'var x = /[P QR]/\\\\u0067';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0044/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0044/expected.json
new file mode 100644
index 0000000000..7b451084c4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0044/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "value": "var x = /[P QR]/\\\\u0067",
+ "rawValue": "var x = /[P QR]/\\\\u0067",
+ "raw": "'var x = /[P QR]/\\\\\\\\u0067'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0044/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0044/options.json
new file mode 100644
index 0000000000..2a73699bc2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0044/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0048/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0048/actual.js
new file mode 100644
index 0000000000..3271450755
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0048/actual.js
@@ -0,0 +1 @@
+var source = '"\\u{110000}"';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0048/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0048/expected.json
new file mode 100644
index 0000000000..c74b8f4b9d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0048/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": "\"\\u{110000}\"",
+ "rawValue": "\"\\u{110000}\"",
+ "raw": "'\"\\\\u{110000}\"'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0048/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0048/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0048/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0049/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0049/actual.js
new file mode 100644
index 0000000000..1a2de200fe
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0049/actual.js
@@ -0,0 +1 @@
+var source = '"\\u{}"';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0049/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0049/expected.json
new file mode 100644
index 0000000000..0d8aed2410
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0049/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "value": "\"\\u{}\"",
+ "rawValue": "\"\\u{}\"",
+ "raw": "'\"\\\\u{}\"'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0049/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0049/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0049/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0050/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0050/actual.js
new file mode 100644
index 0000000000..eac5bf2ce6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0050/actual.js
@@ -0,0 +1 @@
+var source = '"\\u{FFFF"';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0050/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0050/expected.json
new file mode 100644
index 0000000000..fc597b32c5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0050/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "value": "\"\\u{FFFF\"",
+ "rawValue": "\"\\u{FFFF\"",
+ "raw": "'\"\\\\u{FFFF\"'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0050/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0050/options.json
new file mode 100644
index 0000000000..328b1ddde8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0050/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0051/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0051/actual.js
new file mode 100644
index 0000000000..b190f73e12
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0051/actual.js
@@ -0,0 +1 @@
+var source = '"\\u{FFZ}"';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0051/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0051/expected.json
new file mode 100644
index 0000000000..e22bc63888
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0051/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "value": "\"\\u{FFZ}\"",
+ "rawValue": "\"\\u{FFZ}\"",
+ "raw": "'\"\\\\u{FFZ}\"'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0051/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0051/options.json
new file mode 100644
index 0000000000..65ef4a184a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0051/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:8)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0075/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0075/actual.js
new file mode 100644
index 0000000000..d511811854
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0075/actual.js
@@ -0,0 +1 @@
+({ set s() { } })
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0075/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0075/options.json
new file mode 100644
index 0000000000..0341c5637c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0075/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "setter should have exactly one param (1:8)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0137/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0137/actual.js
new file mode 100644
index 0000000000..93e2a300f1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0137/actual.js
@@ -0,0 +1 @@
+var source = '\u203F = 10';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0137/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0137/expected.json
new file mode 100644
index 0000000000..c910512d1a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0137/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "value": "‿ = 10",
+ "rawValue": "‿ = 10",
+ "raw": "'\\u203F = 10'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0137/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0137/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0137/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0163/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0163/actual.js
new file mode 100644
index 0000000000..cd1103629d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0163/actual.js
@@ -0,0 +1 @@
+var source = '\\u005c';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0163/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0163/expected.json
new file mode 100644
index 0000000000..e3f4ea1270
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0163/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "value": "\\u005c",
+ "rawValue": "\\u005c",
+ "raw": "'\\\\u005c'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0163/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0163/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0163/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0165/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0165/actual.js
new file mode 100644
index 0000000000..aa31feb7ec
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0165/actual.js
@@ -0,0 +1 @@
+var source = '\\u0000';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0165/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0165/expected.json
new file mode 100644
index 0000000000..968d4f6a66
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0165/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "value": "\\u0000",
+ "rawValue": "\\u0000",
+ "raw": "'\\\\u0000'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0165/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0165/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0165/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0166/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0166/actual.js
new file mode 100644
index 0000000000..29a288bee4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0166/actual.js
@@ -0,0 +1 @@
+var source = '\u200C = []';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0166/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0166/expected.json
new file mode 100644
index 0000000000..f9b68dd718
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0166/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "value": " = []",
+ "rawValue": " = []",
+ "raw": "'\\u200C = []'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0166/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0166/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0166/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0167/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0167/actual.js
new file mode 100644
index 0000000000..ec9a56e78c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0167/actual.js
@@ -0,0 +1 @@
+var source = '\u200D = []';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0167/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0167/expected.json
new file mode 100644
index 0000000000..238759889e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0167/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "value": " = []",
+ "rawValue": " = []",
+ "raw": "'\\u200D = []'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0167/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0167/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0167/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0169/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0169/actual.js
new file mode 100644
index 0000000000..481ef9c808
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0169/actual.js
@@ -0,0 +1 @@
+var source = '"\\u';
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0169/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0169/expected.json
new file mode 100644
index 0000000000..5dcccc5d34
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0169/expected.json
@@ -0,0 +1,100 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "value": "\"\\u",
+ "rawValue": "\"\\u",
+ "raw": "'\"\\\\u'"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0169/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0169/options.json
new file mode 100644
index 0000000000..9f7910a413
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0169/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0250/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0250/actual.js
new file mode 100644
index 0000000000..b38460128f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0250/actual.js
@@ -0,0 +1 @@
+x = { __proto__: 42, __proto__: 43 }
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0250/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0250/expected.json
new file mode 100644
index 0000000000..d6b7e5702f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0250/expected.json
@@ -0,0 +1,206 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 4,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 6,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 17,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 21,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 32,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "extra": {
+ "rawValue": 43,
+ "raw": "43"
+ },
+ "value": 43
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0250/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0250/options.json
new file mode 100644
index 0000000000..ae09c6ae48
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0250/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:21)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0277/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0277/actual.js
new file mode 100644
index 0000000000..72959842be
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0277/actual.js
@@ -0,0 +1 @@
+class A {a(enum){}}
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0277/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0277/expected.json
new file mode 100644
index 0000000000..374479f48a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0277/expected.json
@@ -0,0 +1,168 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "static": false,
+ "kind": "method",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 10,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "enum"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/.migrated_0277/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0277/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/.migrated_0277/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-00/actual.js b/test/fixtures/esprima/invalid-syntax/GH-1106-00/actual.js
new file mode 100644
index 0000000000..5a64203ac2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-00/actual.js
@@ -0,0 +1 @@
+"\x";
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-00/options.json b/test/fixtures/esprima/invalid-syntax/GH-1106-00/options.json
new file mode 100644
index 0000000000..143c8be643
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-00/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Bad character escape sequence (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-01/actual.js b/test/fixtures/esprima/invalid-syntax/GH-1106-01/actual.js
new file mode 100644
index 0000000000..fdf6b4ff7b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-01/actual.js
@@ -0,0 +1 @@
+"\x0";
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-01/options.json b/test/fixtures/esprima/invalid-syntax/GH-1106-01/options.json
new file mode 100644
index 0000000000..143c8be643
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-01/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Bad character escape sequence (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-02/actual.js b/test/fixtures/esprima/invalid-syntax/GH-1106-02/actual.js
new file mode 100644
index 0000000000..ce2c7dfa93
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-02/actual.js
@@ -0,0 +1 @@
+"\xx";
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-02/options.json b/test/fixtures/esprima/invalid-syntax/GH-1106-02/options.json
new file mode 100644
index 0000000000..143c8be643
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-02/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Bad character escape sequence (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-03/actual.js b/test/fixtures/esprima/invalid-syntax/GH-1106-03/actual.js
new file mode 100644
index 0000000000..8f04b77029
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-03/actual.js
@@ -0,0 +1 @@
+"\u";
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-03/options.json b/test/fixtures/esprima/invalid-syntax/GH-1106-03/options.json
new file mode 100644
index 0000000000..143c8be643
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-03/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Bad character escape sequence (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-04/actual.js b/test/fixtures/esprima/invalid-syntax/GH-1106-04/actual.js
new file mode 100644
index 0000000000..422fe603b5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-04/actual.js
@@ -0,0 +1 @@
+"\u0";
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-04/options.json b/test/fixtures/esprima/invalid-syntax/GH-1106-04/options.json
new file mode 100644
index 0000000000..143c8be643
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-04/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Bad character escape sequence (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-05/actual.js b/test/fixtures/esprima/invalid-syntax/GH-1106-05/actual.js
new file mode 100644
index 0000000000..0e0fb8fb4d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-05/actual.js
@@ -0,0 +1 @@
+"\ux";
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-05/options.json b/test/fixtures/esprima/invalid-syntax/GH-1106-05/options.json
new file mode 100644
index 0000000000..143c8be643
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-05/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Bad character escape sequence (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-06/actual.js b/test/fixtures/esprima/invalid-syntax/GH-1106-06/actual.js
new file mode 100644
index 0000000000..e9a8c01817
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-06/actual.js
@@ -0,0 +1 @@
+"\u00";
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-06/options.json b/test/fixtures/esprima/invalid-syntax/GH-1106-06/options.json
new file mode 100644
index 0000000000..143c8be643
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-06/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Bad character escape sequence (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-07/actual.js b/test/fixtures/esprima/invalid-syntax/GH-1106-07/actual.js
new file mode 100644
index 0000000000..b77b4ffa07
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-07/actual.js
@@ -0,0 +1 @@
+"\u000";
diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-07/options.json b/test/fixtures/esprima/invalid-syntax/GH-1106-07/options.json
new file mode 100644
index 0000000000..143c8be643
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/GH-1106-07/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Bad character escape sequence (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0000/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0000/actual.js
new file mode 100644
index 0000000000..98232c64fc
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0000/actual.js
@@ -0,0 +1 @@
+{
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0000/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0000/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0000/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0001/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0001/actual.js
new file mode 100644
index 0000000000..5c34318c21
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0001/actual.js
@@ -0,0 +1 @@
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0001/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0001/options.json
new file mode 100644
index 0000000000..919c05ec87
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0001/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0002/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0002/actual.js
new file mode 100644
index 0000000000..595e60763e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0002/actual.js
@@ -0,0 +1 @@
+3ea
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0002/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0002/options.json
new file mode 100644
index 0000000000..cf3086295c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0002/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Invalid number (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0003/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0003/actual.js
new file mode 100644
index 0000000000..b3ef4067a1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0003/actual.js
@@ -0,0 +1 @@
+3in []
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0003/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0003/options.json
new file mode 100644
index 0000000000..b239abb159
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0003/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Identifier directly after number (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0004/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0004/actual.js
new file mode 100644
index 0000000000..0dd5d19ef2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0004/actual.js
@@ -0,0 +1 @@
+3e
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0004/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0004/options.json
new file mode 100644
index 0000000000..cf3086295c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0004/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Invalid number (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0005/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0005/actual.js
new file mode 100644
index 0000000000..bce33bebdd
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0005/actual.js
@@ -0,0 +1 @@
+3e+
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0005/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0005/options.json
new file mode 100644
index 0000000000..cf3086295c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0005/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Invalid number (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0006/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0006/actual.js
new file mode 100644
index 0000000000..d5b347678a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0006/actual.js
@@ -0,0 +1 @@
+3e-
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0006/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0006/options.json
new file mode 100644
index 0000000000..cf3086295c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0006/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Invalid number (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0007/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0007/actual.js
new file mode 100644
index 0000000000..c5606e347b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0007/actual.js
@@ -0,0 +1 @@
+3x
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0007/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0007/options.json
new file mode 100644
index 0000000000..b239abb159
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0007/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Identifier directly after number (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0008/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0008/actual.js
new file mode 100644
index 0000000000..819eb6fa76
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0008/actual.js
@@ -0,0 +1 @@
+3x0
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0008/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0008/options.json
new file mode 100644
index 0000000000..b239abb159
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0008/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Identifier directly after number (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0009/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0009/actual.js
new file mode 100644
index 0000000000..ec687260b8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0009/actual.js
@@ -0,0 +1 @@
+0x
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0009/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0009/options.json
new file mode 100644
index 0000000000..b4716df8c6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0009/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expected number in radix 16 (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0010/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0010/actual.js
new file mode 100644
index 0000000000..f21bf23578
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0010/actual.js
@@ -0,0 +1 @@
+01a
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0010/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0010/options.json
new file mode 100644
index 0000000000..aa61ff56c2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0010/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Identifier directly after number (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0011/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0011/actual.js
new file mode 100644
index 0000000000..636d63d27a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0011/actual.js
@@ -0,0 +1 @@
+0o1a
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0011/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0011/options.json
new file mode 100644
index 0000000000..f42de64632
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0011/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Identifier directly after number (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0012/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0012/actual.js
new file mode 100644
index 0000000000..c1b0a14e8e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0012/actual.js
@@ -0,0 +1 @@
+0o
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0012/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0012/options.json
new file mode 100644
index 0000000000..5c0ca078e5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0012/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expected number in radix 8 (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0013/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0013/actual.js
new file mode 100644
index 0000000000..75d282c01a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0013/actual.js
@@ -0,0 +1 @@
+0O
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0013/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0013/options.json
new file mode 100644
index 0000000000..5c0ca078e5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0013/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expected number in radix 8 (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0014/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0014/actual.js
new file mode 100644
index 0000000000..7a0afdef9e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0014/actual.js
@@ -0,0 +1 @@
+0o9
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0014/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0014/options.json
new file mode 100644
index 0000000000..5c0ca078e5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0014/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expected number in radix 8 (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0015/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0015/actual.js
new file mode 100644
index 0000000000..85651f72b5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0015/actual.js
@@ -0,0 +1 @@
+0o18
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0015/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0015/options.json
new file mode 100644
index 0000000000..3b5e811628
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0015/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0016/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0016/actual.js
new file mode 100644
index 0000000000..5df2ec263c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0016/actual.js
@@ -0,0 +1 @@
+0O1a
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0016/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0016/options.json
new file mode 100644
index 0000000000..f42de64632
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0016/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Identifier directly after number (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0017/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0017/actual.js
new file mode 100644
index 0000000000..59db2fe288
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0017/actual.js
@@ -0,0 +1 @@
+0b
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0017/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0017/options.json
new file mode 100644
index 0000000000..d00691a137
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0017/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expected number in radix 2 (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0018/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0018/actual.js
new file mode 100644
index 0000000000..3e0f73a9e3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0018/actual.js
@@ -0,0 +1 @@
+0b1a
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0018/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0018/options.json
new file mode 100644
index 0000000000..f42de64632
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0018/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Identifier directly after number (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0019/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0019/actual.js
new file mode 100644
index 0000000000..e62cb535f5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0019/actual.js
@@ -0,0 +1 @@
+0b9
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0019/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0019/options.json
new file mode 100644
index 0000000000..d00691a137
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0019/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expected number in radix 2 (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0020/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0020/actual.js
new file mode 100644
index 0000000000..b8ca7e8b07
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0020/actual.js
@@ -0,0 +1 @@
+0b18
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0020/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0020/options.json
new file mode 100644
index 0000000000..3b5e811628
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0020/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0021/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0021/actual.js
new file mode 100644
index 0000000000..6c1ef85b86
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0021/actual.js
@@ -0,0 +1 @@
+0b12
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0021/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0021/options.json
new file mode 100644
index 0000000000..3b5e811628
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0021/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0022/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0022/actual.js
new file mode 100644
index 0000000000..eb589e9da2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0022/actual.js
@@ -0,0 +1 @@
+0B
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0022/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0022/options.json
new file mode 100644
index 0000000000..d00691a137
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0022/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expected number in radix 2 (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0023/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0023/actual.js
new file mode 100644
index 0000000000..7d2702a63f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0023/actual.js
@@ -0,0 +1 @@
+0B1a
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0023/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0023/options.json
new file mode 100644
index 0000000000..f42de64632
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0023/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Identifier directly after number (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0024/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0024/actual.js
new file mode 100644
index 0000000000..6e4d94bc50
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0024/actual.js
@@ -0,0 +1 @@
+0B9
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0024/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0024/options.json
new file mode 100644
index 0000000000..d00691a137
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0024/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expected number in radix 2 (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0025/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0025/actual.js
new file mode 100644
index 0000000000..4b6bfcaa09
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0025/actual.js
@@ -0,0 +1 @@
+0B18
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0025/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0025/options.json
new file mode 100644
index 0000000000..3b5e811628
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0025/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0026/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0026/actual.js
new file mode 100644
index 0000000000..3b15e039cf
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0026/actual.js
@@ -0,0 +1 @@
+0B12
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0026/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0026/options.json
new file mode 100644
index 0000000000..3b5e811628
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0026/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0027/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0027/actual.js
new file mode 100644
index 0000000000..bc1a867d69
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0027/actual.js
@@ -0,0 +1 @@
+0O9
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0027/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0027/options.json
new file mode 100644
index 0000000000..5c0ca078e5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0027/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expected number in radix 8 (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0028/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0028/actual.js
new file mode 100644
index 0000000000..bb5c956fcb
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0028/actual.js
@@ -0,0 +1 @@
+0O18
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0028/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0028/options.json
new file mode 100644
index 0000000000..3b5e811628
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0028/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0029/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0029/actual.js
new file mode 100644
index 0000000000..e030754528
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0029/actual.js
@@ -0,0 +1 @@
+3in[]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0029/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0029/options.json
new file mode 100644
index 0000000000..b239abb159
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0029/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Identifier directly after number (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0030/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0030/actual.js
new file mode 100644
index 0000000000..ae39b1a8aa
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0030/actual.js
@@ -0,0 +1 @@
+0x3in[]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0030/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0030/options.json
new file mode 100644
index 0000000000..f42de64632
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0030/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Identifier directly after number (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0031/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0031/actual.js
new file mode 100644
index 0000000000..81a3004b84
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0031/actual.js
@@ -0,0 +1,2 @@
+"Hello
+World"
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0031/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0031/options.json
new file mode 100644
index 0000000000..a760565b1b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0031/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated string constant (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0032/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0032/actual.js
new file mode 100644
index 0000000000..442979963f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0032/actual.js
@@ -0,0 +1 @@
+x\
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0032/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0032/options.json
new file mode 100644
index 0000000000..d08f66903c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0032/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expecting Unicode escape sequence \\uXXXX (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0038/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0038/actual.js
new file mode 100644
index 0000000000..b498fd495d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0038/actual.js
@@ -0,0 +1 @@
+/
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0038/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0038/options.json
new file mode 100644
index 0000000000..e07b72599f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0038/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated regular expression (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0039/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0039/actual.js
new file mode 100644
index 0000000000..ee4c926823
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0039/actual.js
@@ -0,0 +1 @@
+/test
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0039/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0039/options.json
new file mode 100644
index 0000000000..e07b72599f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0039/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated regular expression (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0040/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0040/actual.js
new file mode 100644
index 0000000000..d878a41870
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0040/actual.js
@@ -0,0 +1,2 @@
+/test
+/
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0040/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0040/options.json
new file mode 100644
index 0000000000..e07b72599f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0040/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated regular expression (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0045/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0045/actual.js
new file mode 100644
index 0000000000..616fd0585b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0045/actual.js
@@ -0,0 +1 @@
+3 = 4
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0045/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0045/options.json
new file mode 100644
index 0000000000..de19a8ed39
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0045/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0046/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0046/actual.js
new file mode 100644
index 0000000000..f77f75b0d7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0046/actual.js
@@ -0,0 +1 @@
+func() = 4
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0046/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0046/options.json
new file mode 100644
index 0000000000..de19a8ed39
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0046/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0047/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0047/actual.js
new file mode 100644
index 0000000000..963c543b5c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0047/actual.js
@@ -0,0 +1 @@
+(1 + 1) = 10
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0047/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0047/options.json
new file mode 100644
index 0000000000..4d699b8b0c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0047/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0052/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0052/actual.js
new file mode 100644
index 0000000000..8bf3f078ea
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0052/actual.js
@@ -0,0 +1 @@
+1++
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0052/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0052/options.json
new file mode 100644
index 0000000000..de19a8ed39
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0052/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0053/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0053/actual.js
new file mode 100644
index 0000000000..a6f48225e0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0053/actual.js
@@ -0,0 +1 @@
+1--
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0053/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0053/options.json
new file mode 100644
index 0000000000..de19a8ed39
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0053/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0054/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0054/actual.js
new file mode 100644
index 0000000000..cae2d8c862
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0054/actual.js
@@ -0,0 +1 @@
+++1
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0054/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0054/options.json
new file mode 100644
index 0000000000..0b53e4963e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0054/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0055/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0055/actual.js
new file mode 100644
index 0000000000..6d785b0042
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0055/actual.js
@@ -0,0 +1 @@
+--1
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0055/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0055/options.json
new file mode 100644
index 0000000000..0b53e4963e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0055/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0056/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0056/actual.js
new file mode 100644
index 0000000000..18b35ff5a7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0056/actual.js
@@ -0,0 +1 @@
+for((1 + 1) in list) process(x);
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0056/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0056/options.json
new file mode 100644
index 0000000000..85f6f01102
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0056/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0057/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0057/actual.js
new file mode 100644
index 0000000000..558ed37d93
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0057/actual.js
@@ -0,0 +1 @@
+[
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0057/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0057/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0057/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0058/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0058/actual.js
new file mode 100644
index 0000000000..5b911f11dc
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0058/actual.js
@@ -0,0 +1 @@
+[,
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0058/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0058/options.json
new file mode 100644
index 0000000000..e68fbb6aec
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0058/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0059/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0059/actual.js
new file mode 100644
index 0000000000..b2b02c9336
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0059/actual.js
@@ -0,0 +1 @@
+1 + {
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0059/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0059/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0059/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0060/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0060/actual.js
new file mode 100644
index 0000000000..5518c1faaf
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0060/actual.js
@@ -0,0 +1 @@
+1 + { t:t
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0060/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0060/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0060/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0061/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0061/actual.js
new file mode 100644
index 0000000000..21306bd0bd
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0061/actual.js
@@ -0,0 +1 @@
+1 + { t:t,
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0061/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0061/options.json
new file mode 100644
index 0000000000..328b1ddde8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0061/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0062/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0062/actual.js
new file mode 100644
index 0000000000..90e4e14a24
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0062/actual.js
@@ -0,0 +1,2 @@
+var x = /
+/
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0062/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0062/options.json
new file mode 100644
index 0000000000..d5e4b52d5c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0062/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated regular expression (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0063/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0063/actual.js
new file mode 100644
index 0000000000..66386204a9
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0063/actual.js
@@ -0,0 +1 @@
+var x = "
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0063/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0063/options.json
new file mode 100644
index 0000000000..78a668d16d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0063/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated string constant (1:8)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0064/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0064/actual.js
new file mode 100644
index 0000000000..9c2ca5814d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0064/actual.js
@@ -0,0 +1 @@
+var if = 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0064/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0064/options.json
new file mode 100644
index 0000000000..9f7910a413
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0064/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0065/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0065/actual.js
new file mode 100644
index 0000000000..04b9f4b9e6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0065/actual.js
@@ -0,0 +1 @@
+i #= 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0065/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0065/options.json
new file mode 100644
index 0000000000..852d412611
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0065/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected character '#' (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0066/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0066/actual.js
new file mode 100644
index 0000000000..6474a49009
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0066/actual.js
@@ -0,0 +1 @@
+i + 2 = 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0066/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0066/options.json
new file mode 100644
index 0000000000..de19a8ed39
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0066/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0067/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0067/actual.js
new file mode 100644
index 0000000000..f9eaf60b60
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0067/actual.js
@@ -0,0 +1 @@
++i = 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0067/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0067/options.json
new file mode 100644
index 0000000000..de19a8ed39
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0067/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0068/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0068/actual.js
new file mode 100644
index 0000000000..49be204801
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0068/actual.js
@@ -0,0 +1 @@
+1 + (
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0068/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0068/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0068/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0069/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0069/actual.js
new file mode 100644
index 0000000000..98232c64fc
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0069/actual.js
@@ -0,0 +1 @@
+{
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0069/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0069/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0069/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0070/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0070/actual.js
new file mode 100644
index 0000000000..e0b089091d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0070/actual.js
@@ -0,0 +1,3 @@
+/* Some multiline
+comment */
+)
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0070/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0070/options.json
new file mode 100644
index 0000000000..aa8239233c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0070/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (3:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0071/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0071/actual.js
new file mode 100644
index 0000000000..6f0c9a74a2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0071/actual.js
@@ -0,0 +1 @@
+{ set 1 }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0071/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0071/options.json
new file mode 100644
index 0000000000..515b971673
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0071/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:6)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0072/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0072/actual.js
new file mode 100644
index 0000000000..0718d8d1a0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0072/actual.js
@@ -0,0 +1 @@
+{ get 2 }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0072/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0072/options.json
new file mode 100644
index 0000000000..515b971673
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0072/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:6)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0073/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0073/actual.js
new file mode 100644
index 0000000000..0bfede151f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0073/actual.js
@@ -0,0 +1 @@
+({ set: s(if) { } })
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0073/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0073/options.json
new file mode 100644
index 0000000000..328b1ddde8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0073/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0074/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0074/actual.js
new file mode 100644
index 0000000000..74ef97f8fc
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0074/actual.js
@@ -0,0 +1 @@
+({ set s(.) { } })
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0074/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0074/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0074/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0076/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0076/actual.js
new file mode 100644
index 0000000000..d016bfac86
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0076/actual.js
@@ -0,0 +1 @@
+({ set: s() { } })
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0076/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0076/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0076/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0077/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0077/actual.js
new file mode 100644
index 0000000000..3565cf9420
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0077/actual.js
@@ -0,0 +1 @@
+({ set: s(a, b) { } })
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0077/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0077/options.json
new file mode 100644
index 0000000000..89e36d9013
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0077/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:16)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0078/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0078/actual.js
new file mode 100644
index 0000000000..0c8721bff2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0078/actual.js
@@ -0,0 +1 @@
+({ get: g(d) { } })
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0078/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0078/options.json
new file mode 100644
index 0000000000..27f6e27de8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0078/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:13)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0080/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0080/actual.js
new file mode 100644
index 0000000000..1de1532eef
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0080/actual.js
@@ -0,0 +1 @@
+({[a,b]:0})
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0080/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0080/options.json
new file mode 100644
index 0000000000..9f7910a413
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0080/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0081/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0081/actual.js
new file mode 100644
index 0000000000..be1b0c7ed0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0081/actual.js
@@ -0,0 +1 @@
+({get[a,b]:0})
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0081/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0081/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0081/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0082/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0082/actual.js
new file mode 100644
index 0000000000..90278627e4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0082/actual.js
@@ -0,0 +1 @@
+({(a):0})
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0082/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0082/options.json
new file mode 100644
index 0000000000..e68fbb6aec
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0082/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0083/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0083/actual.js
new file mode 100644
index 0000000000..31d05430f1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0083/actual.js
@@ -0,0 +1 @@
+({get{a}:0})
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0083/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0083/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0083/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0084/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0084/actual.js
new file mode 100644
index 0000000000..f505a44ce5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0084/actual.js
@@ -0,0 +1 @@
+({get
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0084/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0084/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0084/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0085/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0085/actual.js
new file mode 100644
index 0000000000..375e21014c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0085/actual.js
@@ -0,0 +1 @@
+((a)) => 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0085/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0085/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0085/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0086/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0086/actual.js
new file mode 100644
index 0000000000..89739afb96
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0086/actual.js
@@ -0,0 +1 @@
+(a, (b)) => 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0086/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0086/options.json
new file mode 100644
index 0000000000..9f7910a413
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0086/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0087/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0087/actual.js
new file mode 100644
index 0000000000..04e1f360a9
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0087/actual.js
@@ -0,0 +1 @@
+"use strict"; (eval = 10) => 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0087/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0087/expected.json
new file mode 100644
index 0000000000..49f6398459
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0087/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 15,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "eval"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 22,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 29,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0087/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0087/options.json
new file mode 100644
index 0000000000..7ba6713b58
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0087/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to eval in strict mode (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0088/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0088/actual.js
new file mode 100644
index 0000000000..a2477b1895
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0088/actual.js
@@ -0,0 +1 @@
+"use strict"; eval => 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0088/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0088/expected.json
new file mode 100644
index 0000000000..56900a141d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0088/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 22,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0088/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0088/options.json
new file mode 100644
index 0000000000..734b22815e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0088/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0089/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0089/actual.js
new file mode 100644
index 0000000000..6c508673a1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0089/actual.js
@@ -0,0 +1 @@
+"use strict"; arguments => 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0089/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0089/expected.json
new file mode 100644
index 0000000000..3382211829
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0089/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "arguments"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0089/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0089/options.json
new file mode 100644
index 0000000000..a3af8401ae
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0089/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0090/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0090/actual.js
new file mode 100644
index 0000000000..520fa01c1f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0090/actual.js
@@ -0,0 +1 @@
+"use strict"; (eval, a) => 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0090/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0090/expected.json
new file mode 100644
index 0000000000..c06f39c9f0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0090/expected.json
@@ -0,0 +1,152 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "eval"
+ },
+ {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0090/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0090/options.json
new file mode 100644
index 0000000000..8de33328ad
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0090/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0091/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0091/actual.js
new file mode 100644
index 0000000000..7fd870b9dd
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0091/actual.js
@@ -0,0 +1 @@
+"use strict"; (arguments, a) => 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0091/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0091/expected.json
new file mode 100644
index 0000000000..39df05159f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0091/expected.json
@@ -0,0 +1,152 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "arguments"
+ },
+ {
+ "type": "Identifier",
+ "start": 26,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 32,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0091/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0091/options.json
new file mode 100644
index 0000000000..e2b36a2437
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0091/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0092/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0092/actual.js
new file mode 100644
index 0000000000..4c4b266635
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0092/actual.js
@@ -0,0 +1 @@
+(a, a) => 42
diff --git a/test/fixtures/harmony/uncategorised/51/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0092/expected.json
similarity index 99%
rename from test/fixtures/harmony/uncategorised/51/expected.json
rename to test/fixtures/esprima/invalid-syntax/migrated_0092/expected.json
index 0fe0e61786..89326051bc 100644
--- a/test/fixtures/harmony/uncategorised/51/expected.json
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0092/expected.json
@@ -114,6 +114,5 @@
}
}
]
- },
- "comments": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json
new file mode 100644
index 0000000000..0590c2b7e6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:4)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0093/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0093/actual.js
new file mode 100644
index 0000000000..c6a78ee8e5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0093/actual.js
@@ -0,0 +1 @@
+"use strict"; (a, a) => 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0093/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0093/options.json
new file mode 100644
index 0000000000..8d80c05650
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0093/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0094/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0094/actual.js
new file mode 100644
index 0000000000..93bfca5079
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0094/actual.js
@@ -0,0 +1 @@
+"use strict"; (a) => 00
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0094/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0094/expected.json
new file mode 100644
index 0000000000..154fb56eab
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0094/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 21,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "value": 0,
+ "rawValue": 0,
+ "raw": "00"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0094/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0094/options.json
new file mode 100644
index 0000000000..2fdbbb1bc8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0094/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Invalid number (1:21)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0095/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0095/actual.js
new file mode 100644
index 0000000000..150c7e8b14
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0095/actual.js
@@ -0,0 +1 @@
+() <= 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0095/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0095/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0095/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0096/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0096/actual.js
new file mode 100644
index 0000000000..d0b3ff9746
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0096/actual.js
@@ -0,0 +1 @@
+() ? 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0096/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0096/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0096/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0097/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0097/actual.js
new file mode 100644
index 0000000000..f70424ee94
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0097/actual.js
@@ -0,0 +1 @@
+() + 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0097/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0097/options.json
new file mode 100644
index 0000000000..04b967a2ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0097/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0098/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0098/actual.js
new file mode 100644
index 0000000000..c8c983560f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0098/actual.js
@@ -0,0 +1 @@
+(10) => 00
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0098/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0098/options.json
new file mode 100644
index 0000000000..4d699b8b0c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0098/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0099/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0099/actual.js
new file mode 100644
index 0000000000..147de1b125
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0099/actual.js
@@ -0,0 +1 @@
+(10, 20) => 00
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0099/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0099/options.json
new file mode 100644
index 0000000000..4d699b8b0c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0099/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0100/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0100/actual.js
new file mode 100644
index 0000000000..352636041d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0100/actual.js
@@ -0,0 +1 @@
+"use strict"; (eval) => 42
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0100/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0100/expected.json
new file mode 100644
index 0000000000..c444d65091
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0100/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 24,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0100/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0100/options.json
new file mode 100644
index 0000000000..8de33328ad
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0100/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0101/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0101/actual.js
new file mode 100644
index 0000000000..a27d9ae050
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0101/actual.js
@@ -0,0 +1 @@
+(eval) => { "use strict"; 42 }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0101/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0101/expected.json
new file mode 100644
index 0000000000..338190dde1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0101/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 10,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 12,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 12,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 26,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 26,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0101/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0101/options.json
new file mode 100644
index 0000000000..4bd43226c1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0101/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0102/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0102/actual.js
new file mode 100644
index 0000000000..ccaeb93a8c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0102/actual.js
@@ -0,0 +1 @@
+p = { q/ }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0102/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0102/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0102/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0103/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0103/actual.js
new file mode 100644
index 0000000000..82bba3473a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0103/actual.js
@@ -0,0 +1 @@
+p = { "q"/ }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0103/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0103/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0103/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0104/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0104/actual.js
new file mode 100644
index 0000000000..9d44939080
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0104/actual.js
@@ -0,0 +1 @@
+function t(if) { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0104/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0104/options.json
new file mode 100644
index 0000000000..3e33f7730f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0104/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0105/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0105/actual.js
new file mode 100644
index 0000000000..d7516ce611
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0105/actual.js
@@ -0,0 +1 @@
+function t(true) { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0105/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0105/options.json
new file mode 100644
index 0000000000..3e33f7730f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0105/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0106/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0106/actual.js
new file mode 100644
index 0000000000..e8edce8239
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0106/actual.js
@@ -0,0 +1 @@
+function t(false) { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0106/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0106/options.json
new file mode 100644
index 0000000000..3e33f7730f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0106/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0107/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0107/actual.js
new file mode 100644
index 0000000000..86c3d224d0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0107/actual.js
@@ -0,0 +1 @@
+function t(null) { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0107/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0107/options.json
new file mode 100644
index 0000000000..3e33f7730f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0107/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0108/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0108/actual.js
new file mode 100644
index 0000000000..6cafc79275
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0108/actual.js
@@ -0,0 +1 @@
+function null() { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0108/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0108/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0108/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0109/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0109/actual.js
new file mode 100644
index 0000000000..bc1d04c212
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0109/actual.js
@@ -0,0 +1 @@
+function true() { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0109/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0109/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0109/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0110/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0110/actual.js
new file mode 100644
index 0000000000..4480e07b7d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0110/actual.js
@@ -0,0 +1 @@
+function false() { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0110/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0110/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0110/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0111/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0111/actual.js
new file mode 100644
index 0000000000..df1aa5f561
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0111/actual.js
@@ -0,0 +1 @@
+function if() { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0111/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0111/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0111/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0112/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0112/actual.js
new file mode 100644
index 0000000000..067469daeb
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0112/actual.js
@@ -0,0 +1 @@
+a b;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json
new file mode 100644
index 0000000000..e68fbb6aec
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0113/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0113/actual.js
new file mode 100644
index 0000000000..4656d46fe7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0113/actual.js
@@ -0,0 +1 @@
+if.a;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0113/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0113/options.json
new file mode 100644
index 0000000000..e68fbb6aec
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0113/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0114/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0114/actual.js
new file mode 100644
index 0000000000..50a58c6f8e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0114/actual.js
@@ -0,0 +1 @@
+a if;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json
new file mode 100644
index 0000000000..e68fbb6aec
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0115/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0115/actual.js
new file mode 100644
index 0000000000..f27f0312fd
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0115/actual.js
@@ -0,0 +1 @@
+a enum;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0115/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0115/options.json
new file mode 100644
index 0000000000..e68fbb6aec
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0115/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0116/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0116/actual.js
new file mode 100644
index 0000000000..bf3fdcd662
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0116/actual.js
@@ -0,0 +1 @@
+break
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0116/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0116/options.json
new file mode 100644
index 0000000000..6ccbfe923d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0116/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic break (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0117/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0117/actual.js
new file mode 100644
index 0000000000..b15d781d74
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0117/actual.js
@@ -0,0 +1 @@
+break 1;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0117/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0117/options.json
new file mode 100644
index 0000000000..515b971673
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0117/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:6)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0118/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0118/actual.js
new file mode 100644
index 0000000000..44c5d7d65e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0118/actual.js
@@ -0,0 +1 @@
+continue
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0118/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0118/options.json
new file mode 100644
index 0000000000..14a50290d0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0118/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic continue (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0119/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0119/actual.js
new file mode 100644
index 0000000000..d3ea6dec54
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0119/actual.js
@@ -0,0 +1 @@
+continue 2;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0119/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0119/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0119/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0120/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0120/actual.js
new file mode 100644
index 0000000000..18db166649
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0120/actual.js
@@ -0,0 +1 @@
+throw
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0120/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0120/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0120/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0121/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0121/actual.js
new file mode 100644
index 0000000000..647703f8c2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0121/actual.js
@@ -0,0 +1 @@
+throw;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0121/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0121/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0121/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0122/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0122/actual.js
new file mode 100644
index 0000000000..18db166649
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0122/actual.js
@@ -0,0 +1 @@
+throw
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0122/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0122/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0122/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0123/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0123/actual.js
new file mode 100644
index 0000000000..93db8e824f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0123/actual.js
@@ -0,0 +1 @@
+for (var i, i2 in {});
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0123/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0123/options.json
new file mode 100644
index 0000000000..7ca1e1ffbb
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0123/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0124/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0124/actual.js
new file mode 100644
index 0000000000..8a28bcd011
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0124/actual.js
@@ -0,0 +1 @@
+for ((i in {}));
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0124/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0124/options.json
new file mode 100644
index 0000000000..51c483f3d3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0124/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0125/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0125/actual.js
new file mode 100644
index 0000000000..726bd139c1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0125/actual.js
@@ -0,0 +1 @@
+for (i + 1 in {});
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0125/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0125/options.json
new file mode 100644
index 0000000000..85f6f01102
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0125/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0126/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0126/actual.js
new file mode 100644
index 0000000000..5f2c966c28
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0126/actual.js
@@ -0,0 +1 @@
+for (+i in {});
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0126/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0126/options.json
new file mode 100644
index 0000000000..85f6f01102
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0126/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to rvalue (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0127/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0127/actual.js
new file mode 100644
index 0000000000..cec627f0c4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0127/actual.js
@@ -0,0 +1 @@
+if(false)
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0127/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0127/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0127/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0128/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0128/actual.js
new file mode 100644
index 0000000000..e75fa10598
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0128/actual.js
@@ -0,0 +1 @@
+if(false) doThis(); else
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0128/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0128/options.json
new file mode 100644
index 0000000000..0c5f4deed6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0128/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:24)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0129/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0129/actual.js
new file mode 100644
index 0000000000..91ebb18bbb
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0129/actual.js
@@ -0,0 +1 @@
+do
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0129/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0129/options.json
new file mode 100644
index 0000000000..e68fbb6aec
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0129/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0130/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0130/actual.js
new file mode 100644
index 0000000000..98dcc6eb86
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0130/actual.js
@@ -0,0 +1 @@
+while(false)
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0130/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0130/options.json
new file mode 100644
index 0000000000..358068a16a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0130/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0131/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0131/actual.js
new file mode 100644
index 0000000000..c046779af2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0131/actual.js
@@ -0,0 +1 @@
+for(;;)
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0131/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0131/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0131/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0132/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0132/actual.js
new file mode 100644
index 0000000000..293dcc9270
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0132/actual.js
@@ -0,0 +1 @@
+with(x)
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0132/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0132/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0132/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0133/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0133/actual.js
new file mode 100644
index 0000000000..7340c58dc3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0133/actual.js
@@ -0,0 +1 @@
+try { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0133/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0133/options.json
new file mode 100644
index 0000000000..9b3d4185f1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0133/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Missing catch or finally clause (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0134/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0134/actual.js
new file mode 100644
index 0000000000..5b0413681b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0134/actual.js
@@ -0,0 +1 @@
+try {} catch (42) {}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0134/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0134/options.json
new file mode 100644
index 0000000000..51c483f3d3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0134/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0135/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0135/actual.js
new file mode 100644
index 0000000000..4667a13b69
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0135/actual.js
@@ -0,0 +1 @@
+try {} catch (answer()) {}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0135/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0135/options.json
new file mode 100644
index 0000000000..aca079ee39
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0135/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:20)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0136/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0136/actual.js
new file mode 100644
index 0000000000..7b5aa84de3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0136/actual.js
@@ -0,0 +1 @@
+try {} catch (-x) {}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0136/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0136/options.json
new file mode 100644
index 0000000000..51c483f3d3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0136/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0138/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0138/actual.js
new file mode 100644
index 0000000000..fcefec567e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0138/actual.js
@@ -0,0 +1 @@
+const x = 12, y;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0138/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0138/expected.json
new file mode 100644
index 0000000000..b5b53bc87a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0138/expected.json
@@ -0,0 +1,132 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 10,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "value": 12,
+ "rawValue": 12,
+ "raw": "12"
+ }
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "y"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0138/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0138/options.json
new file mode 100644
index 0000000000..7ca1e1ffbb
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0138/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0139/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0139/actual.js
new file mode 100644
index 0000000000..147d061751
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0139/actual.js
@@ -0,0 +1 @@
+const x, y = 12;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0139/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0139/expected.json
new file mode 100644
index 0000000000..0d296d31a9
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0139/expected.json
@@ -0,0 +1,132 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "init": null
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 9,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "y"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 13,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "value": 12,
+ "rawValue": 12,
+ "raw": "12"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0139/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0139/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0139/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0140/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0140/actual.js
new file mode 100644
index 0000000000..59607d92f5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0140/actual.js
@@ -0,0 +1 @@
+const x;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0140/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0140/expected.json
new file mode 100644
index 0000000000..cc88fe2b7e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0140/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0140/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0140/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0140/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0141/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0141/actual.js
new file mode 100644
index 0000000000..4e5970dfdc
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0141/actual.js
@@ -0,0 +1 @@
+if(true) let a = 1;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0141/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0141/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0141/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0142/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0142/actual.js
new file mode 100644
index 0000000000..6f01bff4f3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0142/actual.js
@@ -0,0 +1 @@
+if(true) const a = 1;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0142/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0142/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0142/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0143/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0143/actual.js
new file mode 100644
index 0000000000..93f1fa378c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0143/actual.js
@@ -0,0 +1 @@
+switch (c) { default: default: }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0143/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0143/options.json
new file mode 100644
index 0000000000..8ded4af443
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0143/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Multiple default clauses (1:22)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0144/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0144/actual.js
new file mode 100644
index 0000000000..597bda3644
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0144/actual.js
@@ -0,0 +1 @@
+new X()."s"
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0144/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0144/options.json
new file mode 100644
index 0000000000..65ef4a184a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0144/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:8)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0145/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0145/actual.js
new file mode 100644
index 0000000000..33662f5545
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0145/actual.js
@@ -0,0 +1 @@
+/*
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0145/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0145/options.json
new file mode 100644
index 0000000000..228eff80e8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0145/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated comment (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0146/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0146/actual.js
new file mode 100644
index 0000000000..33662f5545
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0146/actual.js
@@ -0,0 +1 @@
+/*
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0146/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0146/options.json
new file mode 100644
index 0000000000..228eff80e8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0146/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated comment (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0147/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0147/actual.js
new file mode 100644
index 0000000000..ad79f5619a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0147/actual.js
@@ -0,0 +1 @@
+/**
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0147/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0147/options.json
new file mode 100644
index 0000000000..228eff80e8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0147/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated comment (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0148/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0148/actual.js
new file mode 100644
index 0000000000..ffbafd018e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0148/actual.js
@@ -0,0 +1,3 @@
+/*
+
+*
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0148/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0148/options.json
new file mode 100644
index 0000000000..228eff80e8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0148/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated comment (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0149/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0149/actual.js
new file mode 100644
index 0000000000..dae851dfe1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0149/actual.js
@@ -0,0 +1 @@
+/*hello
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0149/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0149/options.json
new file mode 100644
index 0000000000..228eff80e8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0149/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated comment (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0150/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0150/actual.js
new file mode 100644
index 0000000000..e63adfb071
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0150/actual.js
@@ -0,0 +1 @@
+/*hello *
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0150/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0150/options.json
new file mode 100644
index 0000000000..228eff80e8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0150/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated comment (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0151/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0151/actual.js
new file mode 100644
index 0000000000..079b5796ef
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0151/actual.js
@@ -0,0 +1 @@
+]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0151/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0151/options.json
new file mode 100644
index 0000000000..919c05ec87
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0151/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0152/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0152/actual.js
new file mode 100644
index 0000000000..079b5796ef
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0152/actual.js
@@ -0,0 +1 @@
+]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0152/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0152/options.json
new file mode 100644
index 0000000000..919c05ec87
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0152/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0153/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0153/actual.js
new file mode 100644
index 0000000000..079b5796ef
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0153/actual.js
@@ -0,0 +1 @@
+]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0153/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0153/options.json
new file mode 100644
index 0000000000..919c05ec87
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0153/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0154/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0154/actual.js
new file mode 100644
index 0000000000..079b5796ef
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0154/actual.js
@@ -0,0 +1 @@
+]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0154/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0154/options.json
new file mode 100644
index 0000000000..919c05ec87
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0154/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0155/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0155/actual.js
new file mode 100644
index 0000000000..dd8e38b429
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0155/actual.js
@@ -0,0 +1,2 @@
+//
+]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0155/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0155/options.json
new file mode 100644
index 0000000000..0361d7c7d2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0155/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0156/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0156/actual.js
new file mode 100644
index 0000000000..b31647414c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0156/actual.js
@@ -0,0 +1,2 @@
+//
+
]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0156/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0156/options.json
new file mode 100644
index 0000000000..aa8239233c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0156/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (3:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0157/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0157/actual.js
new file mode 100644
index 0000000000..bdad89d19c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0157/actual.js
@@ -0,0 +1,2 @@
+/a\
+/
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0157/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0157/options.json
new file mode 100644
index 0000000000..e07b72599f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0157/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated regular expression (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0158/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0158/actual.js
new file mode 100644
index 0000000000..6e011fcd2d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0158/actual.js
@@ -0,0 +1,2 @@
+//
+]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0158/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0158/options.json
new file mode 100644
index 0000000000..aa8239233c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0158/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (3:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0159/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0159/actual.js
new file mode 100644
index 0000000000..583aa13ef8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0159/actual.js
@@ -0,0 +1,2 @@
+/*
+*/]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0159/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0159/options.json
new file mode 100644
index 0000000000..0b22a698d6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0159/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0160/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0160/actual.js
new file mode 100644
index 0000000000..038a61d463
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0160/actual.js
@@ -0,0 +1,2 @@
+/*
+
*/]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0160/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0160/options.json
new file mode 100644
index 0000000000..02c5500083
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0160/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (3:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0161/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0161/actual.js
new file mode 100644
index 0000000000..1a12d8e361
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0161/actual.js
@@ -0,0 +1,2 @@
+/*
+*/]
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0161/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0161/options.json
new file mode 100644
index 0000000000..02c5500083
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0161/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (3:2)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0162/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0162/actual.js
new file mode 100644
index 0000000000..adcf3cef43
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0162/actual.js
@@ -0,0 +1 @@
+\\
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0162/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0162/options.json
new file mode 100644
index 0000000000..c5a8baf2b8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0162/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0164/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0164/actual.js
new file mode 100644
index 0000000000..2c955a68ab
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0164/actual.js
@@ -0,0 +1 @@
+\x
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0164/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0164/options.json
new file mode 100644
index 0000000000..c5a8baf2b8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0164/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0168/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0168/actual.js
new file mode 100644
index 0000000000..032d059cb6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0168/actual.js
@@ -0,0 +1 @@
+"\
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0168/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0168/options.json
new file mode 100644
index 0000000000..a760565b1b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0168/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unterminated string constant (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0170/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0170/actual.js
new file mode 100644
index 0000000000..ecabda4f10
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0170/actual.js
@@ -0,0 +1 @@
+try { } catch() {}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0170/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0170/options.json
new file mode 100644
index 0000000000..51c483f3d3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0170/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0171/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0171/actual.js
new file mode 100644
index 0000000000..a09c86384f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0171/actual.js
@@ -0,0 +1 @@
+return
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0171/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0171/options.json
new file mode 100644
index 0000000000..dececd0e83
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0171/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "'return' outside of function (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0172/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0172/actual.js
new file mode 100644
index 0000000000..bf3fdcd662
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0172/actual.js
@@ -0,0 +1 @@
+break
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0172/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0172/options.json
new file mode 100644
index 0000000000..6ccbfe923d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0172/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic break (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0173/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0173/actual.js
new file mode 100644
index 0000000000..44c5d7d65e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0173/actual.js
@@ -0,0 +1 @@
+continue
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0173/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0173/options.json
new file mode 100644
index 0000000000..14a50290d0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0173/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic continue (1:0)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0174/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0174/actual.js
new file mode 100644
index 0000000000..a586b85c82
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0174/actual.js
@@ -0,0 +1 @@
+switch (x) { default: continue; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0174/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0174/options.json
new file mode 100644
index 0000000000..332366a21c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0174/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic continue (1:22)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0175/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0175/actual.js
new file mode 100644
index 0000000000..6cffa7b720
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0175/actual.js
@@ -0,0 +1 @@
+do { x } *
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0175/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0175/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0175/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0176/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0176/actual.js
new file mode 100644
index 0000000000..8c1c0d5511
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0176/actual.js
@@ -0,0 +1 @@
+while (true) { break x; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0176/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0176/options.json
new file mode 100644
index 0000000000..33bf5f84b8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0176/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic break (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0177/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0177/actual.js
new file mode 100644
index 0000000000..0764ef527f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0177/actual.js
@@ -0,0 +1 @@
+while (true) { continue x; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0177/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0177/options.json
new file mode 100644
index 0000000000..e75cfed858
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0177/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic continue (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0178/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0178/actual.js
new file mode 100644
index 0000000000..b404785be3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0178/actual.js
@@ -0,0 +1 @@
+x: while (true) { (function () { break x; }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0178/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0178/options.json
new file mode 100644
index 0000000000..8008848be3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0178/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic break (1:33)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0179/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0179/actual.js
new file mode 100644
index 0000000000..c2f322687c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0179/actual.js
@@ -0,0 +1 @@
+x: while (true) { (function () { continue x; }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0179/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0179/options.json
new file mode 100644
index 0000000000..f0faa7faaa
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0179/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic continue (1:33)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0180/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0180/actual.js
new file mode 100644
index 0000000000..af82a69c63
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0180/actual.js
@@ -0,0 +1 @@
+x: while (true) { (function () { break; }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0180/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0180/options.json
new file mode 100644
index 0000000000..8008848be3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0180/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic break (1:33)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0181/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0181/actual.js
new file mode 100644
index 0000000000..3e0d6d7a29
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0181/actual.js
@@ -0,0 +1 @@
+x: while (true) { (function () { continue; }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0181/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0181/options.json
new file mode 100644
index 0000000000..f0faa7faaa
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0181/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unsyntactic continue (1:33)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0182/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0182/actual.js
new file mode 100644
index 0000000000..f7285406ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0182/actual.js
@@ -0,0 +1 @@
+x: while (true) { x: while (true) { } }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0182/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0182/options.json
new file mode 100644
index 0000000000..a430baffb5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0182/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Label 'x' is already declared (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0183/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0183/actual.js
new file mode 100644
index 0000000000..8da08f63cf
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0183/actual.js
@@ -0,0 +1 @@
+(function () { 'use strict'; delete i; }())
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0183/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0183/expected.json
new file mode 100644
index 0000000000..4888c9e77c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0183/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 1,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 29,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "expression": {
+ "type": "UnaryExpression",
+ "start": 29,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "operator": "delete",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "name": "i"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0183/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0183/options.json
new file mode 100644
index 0000000000..8112470453
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0183/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Deleting local variable in strict mode (1:29)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0184/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0184/actual.js
new file mode 100644
index 0000000000..83f5153160
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0184/actual.js
@@ -0,0 +1 @@
+(function () { 'use strict'; with (i); }())
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0184/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0184/expected.json
new file mode 100644
index 0000000000..b5c7e063e3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0184/expected.json
@@ -0,0 +1,184 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 1,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "body": [
+ {
+ "type": "WithStatement",
+ "start": 29,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "i"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 37,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0184/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0184/options.json
new file mode 100644
index 0000000000..1b86ef2104
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0184/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "'with' in strict mode (1:29)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0185/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0185/actual.js
new file mode 100644
index 0000000000..3da2a6ce2f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0185/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; var eval = 10; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0185/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0185/expected.json
new file mode 100644
index 0000000000..c791058a75
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0185/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 32,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 36,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "name": "eval"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 43,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 43
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0185/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0185/options.json
new file mode 100644
index 0000000000..0e72c82fe8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0185/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:36)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0186/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0186/actual.js
new file mode 100644
index 0000000000..317faa2c4b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0186/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; var arguments = 10; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0186/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0186/expected.json
new file mode 100644
index 0000000000..d516032ff0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0186/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 32,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 36,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "name": "arguments"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 48,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 48
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0186/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0186/options.json
new file mode 100644
index 0000000000..f171e1b2c8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0186/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:36)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0187/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0187/actual.js
new file mode 100644
index 0000000000..414967c2aa
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0187/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; try { } catch (eval) { } }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0187/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0187/expected.json
new file mode 100644
index 0000000000..25732f3422
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0187/expected.json
@@ -0,0 +1,201 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 32,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 36,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 40,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "name": "eval"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 53,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 53
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0187/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0187/options.json
new file mode 100644
index 0000000000..52cc5e0c10
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0187/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:47)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0188/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0188/actual.js
new file mode 100644
index 0000000000..99e1121230
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0188/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; try { } catch (arguments) { } }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0188/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0188/expected.json
new file mode 100644
index 0000000000..14e6af099e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0188/expected.json
@@ -0,0 +1,201 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 32,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 36,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 40,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "name": "arguments"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 58,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 58
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0188/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0188/options.json
new file mode 100644
index 0000000000..1c09320e14
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0188/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:47)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0189/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0189/actual.js
new file mode 100644
index 0000000000..473b0eb964
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0189/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; eval = 10; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0189/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0189/expected.json
new file mode 100644
index 0000000000..5df2fc7306
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0189/expected.json
@@ -0,0 +1,184 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 32,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "eval"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 39,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0189/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0189/options.json
new file mode 100644
index 0000000000..e606855bd2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0189/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to eval in strict mode (1:32)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0190/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0190/actual.js
new file mode 100644
index 0000000000..4fca40040b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0190/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; arguments = 10; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0190/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0190/expected.json
new file mode 100644
index 0000000000..936555ec42
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0190/expected.json
@@ -0,0 +1,184 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 32,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "arguments"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 44,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 44
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0190/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0190/options.json
new file mode 100644
index 0000000000..d66800268f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0190/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to arguments in strict mode (1:32)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0191/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0191/actual.js
new file mode 100644
index 0000000000..9476f553f4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0191/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; ++eval; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0191/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0191/expected.json
new file mode 100644
index 0000000000..4a54d8d316
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0191/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "operator": "++",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 34,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0191/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0191/options.json
new file mode 100644
index 0000000000..194b27c0a0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0191/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to eval in strict mode (1:34)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0192/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0192/actual.js
new file mode 100644
index 0000000000..b19aafdefe
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0192/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; --eval; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0192/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0192/expected.json
new file mode 100644
index 0000000000..0be9956ee7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0192/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "operator": "--",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 34,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0192/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0192/options.json
new file mode 100644
index 0000000000..194b27c0a0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0192/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to eval in strict mode (1:34)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0193/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0193/actual.js
new file mode 100644
index 0000000000..e9604fa799
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0193/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; ++arguments; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0193/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0193/expected.json
new file mode 100644
index 0000000000..3d5a3384b2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0193/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "operator": "++",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 34,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0193/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0193/options.json
new file mode 100644
index 0000000000..fa7fd234e5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0193/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to arguments in strict mode (1:34)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0194/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0194/actual.js
new file mode 100644
index 0000000000..d13dfec134
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0194/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; --arguments; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0194/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0194/expected.json
new file mode 100644
index 0000000000..a129e39f7e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0194/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "operator": "--",
+ "prefix": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 34,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0194/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0194/options.json
new file mode 100644
index 0000000000..fa7fd234e5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0194/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to arguments in strict mode (1:34)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0195/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0195/actual.js
new file mode 100644
index 0000000000..13f1fda122
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0195/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; eval++; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0195/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0195/expected.json
new file mode 100644
index 0000000000..7c98807107
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0195/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0195/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0195/options.json
new file mode 100644
index 0000000000..e606855bd2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0195/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to eval in strict mode (1:32)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0196/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0196/actual.js
new file mode 100644
index 0000000000..3376981d90
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0196/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; eval--; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0196/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0196/expected.json
new file mode 100644
index 0000000000..7db69736d2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0196/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "operator": "--",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "eval"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0196/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0196/options.json
new file mode 100644
index 0000000000..e606855bd2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0196/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to eval in strict mode (1:32)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0197/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0197/actual.js
new file mode 100644
index 0000000000..a15d29e178
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0197/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; arguments++; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0197/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0197/expected.json
new file mode 100644
index 0000000000..029e95d4fd
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0197/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0197/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0197/options.json
new file mode 100644
index 0000000000..d66800268f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0197/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to arguments in strict mode (1:32)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0198/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0198/actual.js
new file mode 100644
index 0000000000..85bdb41f7f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0198/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; arguments--; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0198/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0198/expected.json
new file mode 100644
index 0000000000..fc9fb9e66f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0198/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 32,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "operator": "--",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "arguments"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0198/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0198/options.json
new file mode 100644
index 0000000000..d66800268f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0198/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Assigning to arguments in strict mode (1:32)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0199/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0199/actual.js
new file mode 100644
index 0000000000..63383f2064
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0199/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; function eval() { } }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0199/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0199/expected.json
new file mode 100644
index 0000000000..416268fca0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0199/expected.json
@@ -0,0 +1,170 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 32,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 41,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 48,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 48
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0199/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0199/options.json
new file mode 100644
index 0000000000..74aee2c177
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0199/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:41)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0200/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0200/actual.js
new file mode 100644
index 0000000000..9ded5a17a2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0200/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; function arguments() { } }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0200/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0200/expected.json
new file mode 100644
index 0000000000..aeae082c8b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0200/expected.json
@@ -0,0 +1,170 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 32,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 41,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 53,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 53
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0200/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0200/options.json
new file mode 100644
index 0000000000..cb4087319e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0200/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:41)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0201/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0201/actual.js
new file mode 100644
index 0000000000..5fbe3c38ee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0201/actual.js
@@ -0,0 +1 @@
+function eval() {'use strict'; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0201/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0201/expected.json
new file mode 100644
index 0000000000..c110e76a57
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0201/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 17,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 17,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0201/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0201/options.json
new file mode 100644
index 0000000000..a49374fb46
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0201/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0202/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0202/actual.js
new file mode 100644
index 0000000000..a849a16ce4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0202/actual.js
@@ -0,0 +1 @@
+function arguments() {'use strict'; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0202/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0202/expected.json
new file mode 100644
index 0000000000..817f907aee
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0202/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 22,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0202/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0202/options.json
new file mode 100644
index 0000000000..8a3871a0d1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0202/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0203/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0203/actual.js
new file mode 100644
index 0000000000..1a911e9452
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0203/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; (function eval() { }()) }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0203/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0203/expected.json
new file mode 100644
index 0000000000..ae9e78153d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0203/expected.json
@@ -0,0 +1,204 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 33,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 33,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 49,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0203/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0203/options.json
new file mode 100644
index 0000000000..9c41225e97
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0203/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:42)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0204/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0204/actual.js
new file mode 100644
index 0000000000..59c6ac030f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0204/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; (function arguments() { }()) }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0204/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0204/expected.json
new file mode 100644
index 0000000000..dc709c3172
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0204/expected.json
@@ -0,0 +1,204 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 60
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 33,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 33,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 54,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 54
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "arguments": [],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0204/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0204/options.json
new file mode 100644
index 0000000000..bc7c65ae7b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0204/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:42)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0205/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0205/actual.js
new file mode 100644
index 0000000000..dcdb7294e1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0205/actual.js
@@ -0,0 +1 @@
+(function eval() {'use strict'; })()
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0205/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0205/expected.json
new file mode 100644
index 0000000000..1a995ca123
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0205/expected.json
@@ -0,0 +1,149 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0205/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0205/options.json
new file mode 100644
index 0000000000..0dcd2b3e58
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0205/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0206/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0206/actual.js
new file mode 100644
index 0000000000..16037653d0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0206/actual.js
@@ -0,0 +1 @@
+(function arguments() {'use strict'; })()
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0206/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0206/expected.json
new file mode 100644
index 0000000000..34984de2e0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0206/expected.json
@@ -0,0 +1,149 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 22,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 23,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 23,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0206/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0206/options.json
new file mode 100644
index 0000000000..57ba0014b4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0206/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0207/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0207/actual.js
new file mode 100644
index 0000000000..022bc8130c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0207/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; ({ s: function eval() { } }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0207/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0207/expected.json
new file mode 100644
index 0000000000..f6abe3ed03
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0207/expected.json
@@ -0,0 +1,240 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 33,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 35,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "s"
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "start": 38,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 51
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 54,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 54
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "kind": "init"
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0207/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0207/options.json
new file mode 100644
index 0000000000..52cc5e0c10
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0207/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:47)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0208/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0208/actual.js
new file mode 100644
index 0000000000..6ff7af500d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0208/actual.js
@@ -0,0 +1 @@
+(function package() {'use strict'; })()
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0208/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0208/expected.json
new file mode 100644
index 0000000000..d0765fadb6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0208/expected.json
@@ -0,0 +1,149 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "callee": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "package"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 21,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 21,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0208/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0208/options.json
new file mode 100644
index 0000000000..94e937fa7c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0208/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding package in strict mode (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0209/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0209/actual.js
new file mode 100644
index 0000000000..9be1bda833
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0209/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; ({ i: 10, set s(eval) { } }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0209/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0209/expected.json
new file mode 100644
index 0000000000..c888aaf947
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0209/expected.json
@@ -0,0 +1,295 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 33,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 35,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "i"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 38,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 42,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 46,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 46
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "name": "s"
+ },
+ "kind": "set",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 47,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 48,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 48
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 54,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 54
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0209/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0209/options.json
new file mode 100644
index 0000000000..d6f5d89ca6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0209/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:48)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0210/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0210/actual.js
new file mode 100644
index 0000000000..a8c4c44203
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0210/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; ({ set s(eval) { } }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0210/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0210/expected.json
new file mode 100644
index 0000000000..bebdcad342
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0210/expected.json
@@ -0,0 +1,242 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 33,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 35,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 39,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "name": "s"
+ },
+ "kind": "set",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 40,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 41,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 47,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0210/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0210/options.json
new file mode 100644
index 0000000000..74aee2c177
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0210/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:41)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0211/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0211/actual.js
new file mode 100644
index 0000000000..f5aabcc792
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0211/actual.js
@@ -0,0 +1 @@
+function hello() {'use strict'; ({ s: function s(eval) { } }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0211/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0211/expected.json
new file mode 100644
index 0000000000..d098c6d058
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0211/expected.json
@@ -0,0 +1,257 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 64
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 64
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 64
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 64,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 64
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 33,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 60
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 35,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "s"
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "start": 38,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "name": "s"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 49,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 55,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 55
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ "kind": "init"
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0211/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0211/options.json
new file mode 100644
index 0000000000..c181de42a2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0211/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:49)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0212/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0212/actual.js
new file mode 100644
index 0000000000..0cbf5e4f14
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0212/actual.js
@@ -0,0 +1 @@
+function hello(eval) {'use strict';}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0212/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0212/expected.json
new file mode 100644
index 0000000000..6aa54306ed
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0212/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 22,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0212/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0212/options.json
new file mode 100644
index 0000000000..8de33328ad
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0212/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0213/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0213/actual.js
new file mode 100644
index 0000000000..7d75fa5662
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0213/actual.js
@@ -0,0 +1 @@
+function hello(arguments) {'use strict';}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0213/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0213/expected.json
new file mode 100644
index 0000000000..5fbf9ec4b8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0213/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "arguments"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 26,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 27,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 27,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0213/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0213/options.json
new file mode 100644
index 0000000000..e2b36a2437
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0213/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0214/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0214/actual.js
new file mode 100644
index 0000000000..25ed54273b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0214/actual.js
@@ -0,0 +1 @@
+function hello() { 'use strict'; function inner(eval) {} }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0214/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0214/expected.json
new file mode 100644
index 0000000000..8425a41fb7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0214/expected.json
@@ -0,0 +1,187 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 58
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 33,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "name": "inner"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 48,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 48
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 54,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 54
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0214/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0214/options.json
new file mode 100644
index 0000000000..d6f5d89ca6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0214/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:48)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0215/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0215/actual.js
new file mode 100644
index 0000000000..2862cd1587
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0215/actual.js
@@ -0,0 +1 @@
+function hello() { 'use strict'; function inner(arguments) {} }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0215/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0215/expected.json
new file mode 100644
index 0000000000..bab5d19160
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0215/expected.json
@@ -0,0 +1,187 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 33,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "name": "inner"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 48,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 48
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "name": "arguments"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 59,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 59
+ },
+ "end": {
+ "line": 1,
+ "column": 61
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0215/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0215/options.json
new file mode 100644
index 0000000000..8ee11e66ca
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0215/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:48)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0216/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0216/actual.js
new file mode 100644
index 0000000000..23a8ca47f5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0216/actual.js
@@ -0,0 +1 @@
+"\1"; 'use strict';
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0216/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0216/expected.json
new file mode 100644
index 0000000000..77fb11145f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0216/expected.json
@@ -0,0 +1,99 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "value": "\u0001",
+ "rawValue": "\u0001",
+ "raw": "\"\\1\""
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 6,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 6,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "'use strict'"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json
new file mode 100644
index 0000000000..91bbdfe83f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Octal literal in strict mode (1:1)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0217/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0217/actual.js
new file mode 100644
index 0000000000..1f718ed734
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0217/actual.js
@@ -0,0 +1 @@
+function hello() { 'use strict'; "\1"; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0217/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0217/expected.json
new file mode 100644
index 0000000000..53489fbf1c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0217/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ },
+ {
+ "type": "Directive",
+ "start": 33,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 33,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "raw": "\"\\1\"",
+ "value": "\\1"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0217/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0217/options.json
new file mode 100644
index 0000000000..68bfd75832
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0217/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Octal literal in strict mode (1:34)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0218/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0218/actual.js
new file mode 100644
index 0000000000..f18ece6395
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0218/actual.js
@@ -0,0 +1 @@
+function hello() { 'use strict'; 021; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0218/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0218/expected.json
new file mode 100644
index 0000000000..29875fff43
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0218/expected.json
@@ -0,0 +1,152 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 33,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "expression": {
+ "type": "NumberLiteral",
+ "start": 33,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "value": 17,
+ "rawValue": 17,
+ "raw": "021"
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0218/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0218/options.json
new file mode 100644
index 0000000000..3711f38eef
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0218/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Invalid number (1:33)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0219/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0219/actual.js
new file mode 100644
index 0000000000..24426d5e8d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0219/actual.js
@@ -0,0 +1 @@
+function hello() { 'use strict'; ({ "\1": 42 }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0219/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0219/expected.json
new file mode 100644
index 0000000000..4e77a05f78
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0219/expected.json
@@ -0,0 +1,209 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 33,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 34,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 36,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 36,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "value": "\u0001",
+ "rawValue": "\u0001",
+ "raw": "\"\\1\""
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 42,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "kind": "init"
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0219/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0219/options.json
new file mode 100644
index 0000000000..fa3a33b55e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0219/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Octal literal in strict mode (1:37)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0220/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0220/actual.js
new file mode 100644
index 0000000000..b6ab67b4f3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0220/actual.js
@@ -0,0 +1 @@
+function hello() { 'use strict'; ({ 021: 42 }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0220/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0220/expected.json
new file mode 100644
index 0000000000..346e059e5f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0220/expected.json
@@ -0,0 +1,209 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 33,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 34,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 36,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "NumberLiteral",
+ "start": 36,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "value": 17,
+ "rawValue": 17,
+ "raw": "021"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 41,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "kind": "init"
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0220/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0220/options.json
new file mode 100644
index 0000000000..a864ada0fe
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0220/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Invalid number (1:36)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0221/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0221/actual.js
new file mode 100644
index 0000000000..7f3ba60659
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0221/actual.js
@@ -0,0 +1 @@
+function hello() { "octal directive\1"; "use strict"; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0221/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0221/expected.json
new file mode 100644
index 0000000000..b8a30a0e6a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0221/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 19,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "value": "octal directive\u0001",
+ "rawValue": "octal directive\u0001",
+ "raw": "\"octal directive\\1\""
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 40,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 40,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json
new file mode 100644
index 0000000000..ae2bfab55c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Octal literal in strict mode (1:35)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0222/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0222/actual.js
new file mode 100644
index 0000000000..01cf42721c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0222/actual.js
@@ -0,0 +1 @@
+function hello() { "octal directive\1"; "octal directive\2"; "use strict"; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0222/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0222/expected.json
new file mode 100644
index 0000000000..61e775efcf
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0222/expected.json
@@ -0,0 +1,183 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 19,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "value": "octal directive\u0001",
+ "rawValue": "octal directive\u0001",
+ "raw": "\"octal directive\\1\""
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 40,
+ "end": 60,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 60
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 40,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "value": "octal directive\u0002",
+ "rawValue": "octal directive\u0002",
+ "raw": "\"octal directive\\2\""
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 61,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 61
+ },
+ "end": {
+ "line": 1,
+ "column": 74
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 61,
+ "end": 73,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 61
+ },
+ "end": {
+ "line": 1,
+ "column": 73
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json
new file mode 100644
index 0000000000..ae2bfab55c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Octal literal in strict mode (1:35)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0223/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0223/actual.js
new file mode 100644
index 0000000000..106319650b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0223/actual.js
@@ -0,0 +1 @@
+function hello() { "use strict"; function inner() { "octal directive\1"; } }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0223/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0223/expected.json
new file mode 100644
index 0000000000..9f10388176
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0223/expected.json
@@ -0,0 +1,203 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 76
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 33,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 74
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "name": "inner"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 50,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 50
+ },
+ "end": {
+ "line": 1,
+ "column": 74
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 52,
+ "end": 72,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 52
+ },
+ "end": {
+ "line": 1,
+ "column": 72
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 52,
+ "end": 71,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 52
+ },
+ "end": {
+ "line": 1,
+ "column": 71
+ }
+ },
+ "raw": "\"octal directive\\1\"",
+ "value": "octal directive\\1"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0223/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0223/options.json
new file mode 100644
index 0000000000..e689079a79
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0223/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Octal literal in strict mode (1:68)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0224/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0224/actual.js
new file mode 100644
index 0000000000..a24a2f642e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0224/actual.js
@@ -0,0 +1 @@
+function hello() { "use strict"; var implements; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0224/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0224/expected.json
new file mode 100644
index 0000000000..9e81efccd6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0224/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "name": "implements"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json
new file mode 100644
index 0000000000..570ca31728
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding implements in strict mode (1:37)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0225/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0225/actual.js
new file mode 100644
index 0000000000..c8ac6e7c06
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0225/actual.js
@@ -0,0 +1 @@
+function hello() { "use strict"; var interface; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0225/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0225/expected.json
new file mode 100644
index 0000000000..09c95282b4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0225/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "name": "interface"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json
new file mode 100644
index 0000000000..dfe4eddc2a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding interface in strict mode (1:37)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0226/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0226/actual.js
new file mode 100644
index 0000000000..ed58aa94a7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0226/actual.js
@@ -0,0 +1 @@
+function hello() { "use strict"; var package; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0226/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0226/expected.json
new file mode 100644
index 0000000000..b5b1bf5fba
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0226/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "name": "package"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json
new file mode 100644
index 0000000000..766ddb41ca
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding package in strict mode (1:37)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0227/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0227/actual.js
new file mode 100644
index 0000000000..3c63082b72
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0227/actual.js
@@ -0,0 +1 @@
+function hello() { "use strict"; var private; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0227/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0227/expected.json
new file mode 100644
index 0000000000..bb397becf0
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0227/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "name": "private"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json
new file mode 100644
index 0000000000..9a7c12e0a6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding private in strict mode (1:37)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0228/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0228/actual.js
new file mode 100644
index 0000000000..ffb8aa0cb9
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0228/actual.js
@@ -0,0 +1 @@
+function hello() { "use strict"; var protected; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0228/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0228/expected.json
new file mode 100644
index 0000000000..14ef8d4896
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0228/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "name": "protected"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json
new file mode 100644
index 0000000000..ba43694c8d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding protected in strict mode (1:37)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0229/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0229/actual.js
new file mode 100644
index 0000000000..929f62327f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0229/actual.js
@@ -0,0 +1 @@
+function hello() { "use strict"; var public; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0229/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0229/expected.json
new file mode 100644
index 0000000000..e6e08fbf57
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0229/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "public"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json
new file mode 100644
index 0000000000..b1dbd863ed
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding public in strict mode (1:37)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0230/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0230/actual.js
new file mode 100644
index 0000000000..fcbef3215a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0230/actual.js
@@ -0,0 +1 @@
+function hello() { "use strict"; var static; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0230/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0230/expected.json
new file mode 100644
index 0000000000..a8f07d2a1b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0230/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "static"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json
new file mode 100644
index 0000000000..75ad83ddbb
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding static in strict mode (1:37)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0231/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0231/actual.js
new file mode 100644
index 0000000000..7f5d158aa2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0231/actual.js
@@ -0,0 +1 @@
+function hello() { "use strict"; var yield; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0231/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0231/expected.json
new file mode 100644
index 0000000000..cbac229e7c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0231/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 33,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 37,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "name": "yield"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0231/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0231/options.json
new file mode 100644
index 0000000000..22d103a833
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0231/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:37)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0232/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0232/actual.js
new file mode 100644
index 0000000000..40e528cda3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0232/actual.js
@@ -0,0 +1 @@
+function hello() { "use strict"; var let; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0232/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0232/options.json
new file mode 100644
index 0000000000..22d103a833
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0232/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:37)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0233/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0233/actual.js
new file mode 100644
index 0000000000..9989eb6e06
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0233/actual.js
@@ -0,0 +1 @@
+function hello(static) { "use strict"; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0233/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0233/expected.json
new file mode 100644
index 0000000000..9454908513
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0233/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "static"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 25,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 25,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0233/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0233/options.json
new file mode 100644
index 0000000000..07a8c1c0f1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0233/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding static in strict mode (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0234/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0234/actual.js
new file mode 100644
index 0000000000..5a6fe505bc
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0234/actual.js
@@ -0,0 +1 @@
+function static() { "use strict"; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0234/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0234/expected.json
new file mode 100644
index 0000000000..42dbd8e915
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0234/expected.json
@@ -0,0 +1,117 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "static"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 20,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0234/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0234/options.json
new file mode 100644
index 0000000000..f7524a3327
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0234/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding static in strict mode (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0235/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0235/actual.js
new file mode 100644
index 0000000000..95b11685e4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0235/actual.js
@@ -0,0 +1 @@
+function eval(a) { "use strict"; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0235/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0235/expected.json
new file mode 100644
index 0000000000..ae4c951249
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0235/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "eval"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0235/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0235/options.json
new file mode 100644
index 0000000000..a49374fb46
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0235/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0236/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0236/actual.js
new file mode 100644
index 0000000000..304c94536b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0236/actual.js
@@ -0,0 +1 @@
+function arguments(a) { "use strict"; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0236/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0236/expected.json
new file mode 100644
index 0000000000..4bd552372c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0236/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "arguments"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 22,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 24,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 24,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0236/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0236/options.json
new file mode 100644
index 0000000000..8a3871a0d1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0236/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding arguments in strict mode (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0238/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0238/actual.js
new file mode 100644
index 0000000000..c87b8eaaf4
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0238/actual.js
@@ -0,0 +1 @@
+var let
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0238/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0238/expected.json
new file mode 100644
index 0000000000..f5cbcbeb1d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0238/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "let"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0238/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0238/options.json
new file mode 100644
index 0000000000..9f7910a413
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0238/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:4)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0239/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0239/actual.js
new file mode 100644
index 0000000000..d38b6bace9
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0239/actual.js
@@ -0,0 +1 @@
+"use strict"; function static() { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0239/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0239/expected.json
new file mode 100644
index 0000000000..e019755823
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0239/expected.json
@@ -0,0 +1,118 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "static"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 32,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json
new file mode 100644
index 0000000000..69a9237df8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "The keyword 'static' is reserved (1:23)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0240/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0240/actual.js
new file mode 100644
index 0000000000..bd0106ab72
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0240/actual.js
@@ -0,0 +1 @@
+function a(t, t) { "use strict"; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0240/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0240/expected.json
new file mode 100644
index 0000000000..51085f798f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0240/expected.json
@@ -0,0 +1,151 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0240/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0240/options.json
new file mode 100644
index 0000000000..421c28bbd6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0240/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0241/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0241/actual.js
new file mode 100644
index 0000000000..cb2f36487e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0241/actual.js
@@ -0,0 +1 @@
+function a(eval) { "use strict"; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0241/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0241/expected.json
new file mode 100644
index 0000000000..14824eac9f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0241/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0241/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0241/options.json
new file mode 100644
index 0000000000..301643713f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0241/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0242/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0242/actual.js
new file mode 100644
index 0000000000..4c24f21c91
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0242/actual.js
@@ -0,0 +1 @@
+function a(package) { "use strict"; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0242/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0242/expected.json
new file mode 100644
index 0000000000..b18233c76a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0242/expected.json
@@ -0,0 +1,134 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 11,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "package"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 22,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0242/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0242/options.json
new file mode 100644
index 0000000000..31ebd9508d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0242/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding package in strict mode (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0243/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0243/actual.js
new file mode 100644
index 0000000000..830cb897d3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0243/actual.js
@@ -0,0 +1 @@
+function a() { "use strict"; function b(t, t) { }; }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0243/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0243/expected.json
new file mode 100644
index 0000000000..97c6620ab1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0243/expected.json
@@ -0,0 +1,218 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 29,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 38,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "name": "b"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 40,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 43,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 43
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 46,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 46
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ },
+ {
+ "type": "EmptyStatement",
+ "start": 49,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0243/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0243/options.json
new file mode 100644
index 0000000000..9db3dfc50c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0243/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:43)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0244/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0244/actual.js
new file mode 100644
index 0000000000..9fa07b0a2a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0244/actual.js
@@ -0,0 +1 @@
+(function a(t, t) { "use strict"; })
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0244/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0244/expected.json
new file mode 100644
index 0000000000..6b5bcf5c66
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0244/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 20,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 20,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0244/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0244/options.json
new file mode 100644
index 0000000000..13e320a983
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0244/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:15)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0245/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0245/actual.js
new file mode 100644
index 0000000000..424f432ff6
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0245/actual.js
@@ -0,0 +1 @@
+function a() { "use strict"; (function b(t, t) { }); }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0245/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0245/expected.json
new file mode 100644
index 0000000000..636e4bc049
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0245/expected.json
@@ -0,0 +1,221 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 29,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 30,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 39,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "name": "b"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 41,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 44,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 44
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 47,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0245/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0245/options.json
new file mode 100644
index 0000000000..0e4f27a823
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0245/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:44)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0246/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0246/actual.js
new file mode 100644
index 0000000000..340ca59613
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0246/actual.js
@@ -0,0 +1 @@
+(function a(eval) { "use strict"; })
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0246/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0246/expected.json
new file mode 100644
index 0000000000..a4e3e8cbd5
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0246/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 20,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0246/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0246/options.json
new file mode 100644
index 0000000000..c9df15d6ef
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0246/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding eval in strict mode (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0247/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0247/actual.js
new file mode 100644
index 0000000000..2d07eeebbf
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0247/actual.js
@@ -0,0 +1 @@
+(function a(package) { "use strict"; })
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0247/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0247/expected.json
new file mode 100644
index 0000000000..63264f0559
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0247/expected.json
@@ -0,0 +1,150 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "package"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 23,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 23,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ },
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0247/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0247/options.json
new file mode 100644
index 0000000000..87abf59529
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0247/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Binding package in strict mode (1:12)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0248/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0248/actual.js
new file mode 100644
index 0000000000..3d2f790772
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0248/actual.js
@@ -0,0 +1 @@
+__proto__: __proto__: 42;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0248/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0248/options.json
new file mode 100644
index 0000000000..bb0741872a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0248/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Label '__proto__' is already declared (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0249/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0249/actual.js
new file mode 100644
index 0000000000..6d657e5531
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0249/actual.js
@@ -0,0 +1 @@
+"use strict"; function t(__proto__, __proto__) { }
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0249/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0249/expected.json
new file mode 100644
index 0000000000..fc69d156ec
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0249/expected.json
@@ -0,0 +1,151 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "t"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 25,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "name": "__proto__"
+ },
+ {
+ "type": "Identifier",
+ "start": 36,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "name": "__proto__"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 47,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0249/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0249/options.json
new file mode 100644
index 0000000000..e887380a58
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0249/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Argument name clash in strict mode (1:36)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0252/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0252/actual.js
new file mode 100644
index 0000000000..186857b9e8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0252/actual.js
@@ -0,0 +1 @@
+var
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0252/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0252/options.json
new file mode 100644
index 0000000000..3b5e811628
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0252/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0253/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0253/actual.js
new file mode 100644
index 0000000000..564a1caa1c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0253/actual.js
@@ -0,0 +1 @@
+let
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0253/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0253/expected.json
new file mode 100644
index 0000000000..51d622d320
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0253/expected.json
@@ -0,0 +1,64 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 3,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 3
+ }
+ },
+ "name": "let"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0253/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0253/options.json
new file mode 100644
index 0000000000..3b5e811628
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0253/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:3)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0254/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0254/actual.js
new file mode 100644
index 0000000000..aaae4e1105
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0254/actual.js
@@ -0,0 +1 @@
+const
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0254/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0254/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0254/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0255/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0255/actual.js
new file mode 100644
index 0000000000..1349ddc4b7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0255/actual.js
@@ -0,0 +1 @@
+{ ; ;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0255/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0255/options.json
new file mode 100644
index 0000000000..515b971673
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0255/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:6)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0256/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0256/actual.js
new file mode 100644
index 0000000000..7a651b7dab
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0256/actual.js
@@ -0,0 +1 @@
+function t() { ; ;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0256/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0256/options.json
new file mode 100644
index 0000000000..1e730e1707
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0256/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:19)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0257/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0257/actual.js
new file mode 100644
index 0000000000..d05111f2b1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0257/actual.js
@@ -0,0 +1 @@
+'use strict'; a package
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0257/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0257/options.json
new file mode 100644
index 0000000000..89e36d9013
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0257/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:16)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0258/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0258/actual.js
new file mode 100644
index 0000000000..efd31c6d91
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0258/actual.js
@@ -0,0 +1 @@
+function f(a, ...b, c){}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json
new file mode 100644
index 0000000000..2a73699bc2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0259/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0259/actual.js
new file mode 100644
index 0000000000..e632766388
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0259/actual.js
@@ -0,0 +1 @@
+function x(...{ a }){}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0259/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0259/options.json
new file mode 100644
index 0000000000..51c483f3d3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0259/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0260/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0260/actual.js
new file mode 100644
index 0000000000..ce8895825f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0260/actual.js
@@ -0,0 +1 @@
+function x(...a = 1){}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0260/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0260/options.json
new file mode 100644
index 0000000000..89e36d9013
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0260/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:16)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0261/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0261/actual.js
new file mode 100644
index 0000000000..b544cd3a5a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0261/actual.js
@@ -0,0 +1 @@
+class
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0261/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0261/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0261/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0262/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0262/actual.js
new file mode 100644
index 0000000000..b544cd3a5a
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0262/actual.js
@@ -0,0 +1 @@
+class
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0262/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0262/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0262/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0263/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0263/actual.js
new file mode 100644
index 0000000000..5514733de2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0263/actual.js
@@ -0,0 +1 @@
+class;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0263/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0263/options.json
new file mode 100644
index 0000000000..0ab445fe47
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0263/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:5)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0264/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0264/actual.js
new file mode 100644
index 0000000000..377c52d036
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0264/actual.js
@@ -0,0 +1 @@
+class A extends a + b {}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0264/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0264/options.json
new file mode 100644
index 0000000000..2a73699bc2
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0264/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:18)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0265/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0265/actual.js
new file mode 100644
index 0000000000..83d15dc739
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0265/actual.js
@@ -0,0 +1 @@
+class A
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0265/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0265/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0265/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0266/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0266/actual.js
new file mode 100644
index 0000000000..352b0f29c9
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0266/actual.js
@@ -0,0 +1 @@
+class A {
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0266/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0266/options.json
new file mode 100644
index 0000000000..93db7641c7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0266/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:9)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0267/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0267/actual.js
new file mode 100644
index 0000000000..a8921ee1b1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0267/actual.js
@@ -0,0 +1 @@
+class A;
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0267/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0267/options.json
new file mode 100644
index 0000000000..167116741e
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0267/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0268/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0268/actual.js
new file mode 100644
index 0000000000..a90634119b
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0268/actual.js
@@ -0,0 +1 @@
+class A {a:0}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0268/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0268/options.json
new file mode 100644
index 0000000000..328b1ddde8
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0268/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:10)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0269/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0269/actual.js
new file mode 100644
index 0000000000..5168697dfb
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0269/actual.js
@@ -0,0 +1 @@
+class A {a(){},b(){}}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0269/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0269/options.json
new file mode 100644
index 0000000000..51c483f3d3
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0269/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:14)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0270/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0270/actual.js
new file mode 100644
index 0000000000..1dd45cdc92
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0270/actual.js
@@ -0,0 +1 @@
+class A {static prototype(){}}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0270/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0270/expected.json
new file mode 100644
index 0000000000..ee4de023b7
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0270/expected.json
@@ -0,0 +1,151 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "prototype"
+ },
+ "static": true,
+ "kind": "method",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 25,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0270/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0270/options.json
new file mode 100644
index 0000000000..8df109cb3c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0270/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Classes may not have static property named prototype (1:16)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0271/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0271/actual.js
new file mode 100644
index 0000000000..1eda932405
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0271/actual.js
@@ -0,0 +1 @@
+class A {static "prototype"(){}}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0271/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0271/expected.json
new file mode 100644
index 0000000000..d1b5f89276
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0271/expected.json
@@ -0,0 +1,153 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Literal",
+ "start": 16,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "value": "prototype",
+ "rawValue": "prototype",
+ "raw": "\"prototype\""
+ },
+ "static": true,
+ "kind": "method",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 27,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 29,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json
new file mode 100644
index 0000000000..8df109cb3c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Classes may not have static property named prototype (1:16)"
+}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0272/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0272/actual.js
new file mode 100644
index 0000000000..819ff281ef
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0272/actual.js
@@ -0,0 +1 @@
+class A {get constructor(){}}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0272/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0272/options.json
new file mode 100644
index 0000000000..cbb8e10c8d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0272/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Constructor can't have get/set modifier (1:13)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0273/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0273/actual.js
new file mode 100644
index 0000000000..b92c5fd75f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0273/actual.js
@@ -0,0 +1 @@
+class A {set constructor(m){}}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0273/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0273/options.json
new file mode 100644
index 0000000000..cbb8e10c8d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0273/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Constructor can't have get/set modifier (1:13)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0274/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0274/actual.js
new file mode 100644
index 0000000000..dd0fd8728d
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0274/actual.js
@@ -0,0 +1 @@
+class A {constructor(){} "constructor"(){}}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0274/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0274/options.json
new file mode 100644
index 0000000000..cf2d761794
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0274/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Duplicate constructor in the same class (1:25)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0275/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0275/actual.js
new file mode 100644
index 0000000000..9db4aa8388
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0275/actual.js
@@ -0,0 +1 @@
+class A {a static(){}}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0275/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0275/options.json
new file mode 100644
index 0000000000..3e33f7730f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0275/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:11)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0276/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0276/actual.js
new file mode 100644
index 0000000000..baca917bf1
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0276/actual.js
@@ -0,0 +1 @@
+class A {static static static(){}}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0276/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0276/options.json
new file mode 100644
index 0000000000..2ddc9e708f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0276/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:23)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0278/actual.js b/test/fixtures/esprima/invalid-syntax/migrated_0278/actual.js
new file mode 100644
index 0000000000..bdd71a4d67
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0278/actual.js
@@ -0,0 +1 @@
+class A {static [static](){};}
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0278/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0278/expected.json
new file mode 100644
index 0000000000..1e47cb6c1c
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0278/expected.json
@@ -0,0 +1,151 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "A"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 8,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 9,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "computed": true,
+ "key": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "static"
+ },
+ "static": true,
+ "kind": "method",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 24,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 26,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "body": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json
new file mode 100644
index 0000000000..8a55b8365f
--- /dev/null
+++ b/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "The keyword 'static' is reserved (1:17)"
+}
diff --git a/test/fixtures/esprima/statement-block/migrated_0000/actual.js b/test/fixtures/esprima/statement-block/migrated_0000/actual.js
new file mode 100644
index 0000000000..7a5352faf7
--- /dev/null
+++ b/test/fixtures/esprima/statement-block/migrated_0000/actual.js
@@ -0,0 +1 @@
+{ foo }
diff --git a/test/fixtures/esprima/statement-block/migrated_0000/expected.json b/test/fixtures/esprima/statement-block/migrated_0000/expected.json
new file mode 100644
index 0000000000..5d5053da91
--- /dev/null
+++ b/test/fixtures/esprima/statement-block/migrated_0000/expected.json
@@ -0,0 +1,81 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 2,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "foo"
+ }
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-block/migrated_0001/actual.js b/test/fixtures/esprima/statement-block/migrated_0001/actual.js
new file mode 100644
index 0000000000..50a6ea322a
--- /dev/null
+++ b/test/fixtures/esprima/statement-block/migrated_0001/actual.js
@@ -0,0 +1 @@
+{ doThis(); doThat(); }
diff --git a/test/fixtures/esprima/statement-block/migrated_0001/expected.json b/test/fixtures/esprima/statement-block/migrated_0001/expected.json
new file mode 100644
index 0000000000..eec6775871
--- /dev/null
+++ b/test/fixtures/esprima/statement-block/migrated_0001/expected.json
@@ -0,0 +1,144 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 2,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 2,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 2,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "doThis"
+ },
+ "arguments": []
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 12,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 12,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "doThat"
+ },
+ "arguments": []
+ }
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-block/migrated_0002/actual.js b/test/fixtures/esprima/statement-block/migrated_0002/actual.js
new file mode 100644
index 0000000000..0967ef424b
--- /dev/null
+++ b/test/fixtures/esprima/statement-block/migrated_0002/actual.js
@@ -0,0 +1 @@
+{}
diff --git a/test/fixtures/esprima/statement-block/migrated_0002/expected.json b/test/fixtures/esprima/statement-block/migrated_0002/expected.json
new file mode 100644
index 0000000000..5792211240
--- /dev/null
+++ b/test/fixtures/esprima/statement-block/migrated_0002/expected.json
@@ -0,0 +1,49 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 2,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 2
+ }
+ },
+ "body": []
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-break/migrated_0000/actual.js b/test/fixtures/esprima/statement-break/migrated_0000/actual.js
new file mode 100644
index 0000000000..c566e0aa46
--- /dev/null
+++ b/test/fixtures/esprima/statement-break/migrated_0000/actual.js
@@ -0,0 +1 @@
+while (true) { break }
diff --git a/test/fixtures/esprima/statement-break/migrated_0000/expected.json b/test/fixtures/esprima/statement-break/migrated_0000/expected.json
new file mode 100644
index 0000000000..e27a473406
--- /dev/null
+++ b/test/fixtures/esprima/statement-break/migrated_0000/expected.json
@@ -0,0 +1,99 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [
+ {
+ "type": "BreakStatement",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "label": null
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-break/migrated_0001/actual.js b/test/fixtures/esprima/statement-break/migrated_0001/actual.js
new file mode 100644
index 0000000000..9758f464a9
--- /dev/null
+++ b/test/fixtures/esprima/statement-break/migrated_0001/actual.js
@@ -0,0 +1 @@
+done: while (true) { break done }
diff --git a/test/fixtures/esprima/statement-break/migrated_0001/expected.json b/test/fixtures/esprima/statement-break/migrated_0001/expected.json
new file mode 100644
index 0000000000..930203bdfe
--- /dev/null
+++ b/test/fixtures/esprima/statement-break/migrated_0001/expected.json
@@ -0,0 +1,145 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "LabeledStatement",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": {
+ "type": "WhileStatement",
+ "start": 6,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 13,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "body": [
+ {
+ "type": "BreakStatement",
+ "start": 21,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "done"
+ }
+ }
+ ],
+ "directives": []
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "done"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-break/migrated_0002/actual.js b/test/fixtures/esprima/statement-break/migrated_0002/actual.js
new file mode 100644
index 0000000000..6e1ec8b25b
--- /dev/null
+++ b/test/fixtures/esprima/statement-break/migrated_0002/actual.js
@@ -0,0 +1 @@
+done: while (true) { break done; }
diff --git a/test/fixtures/esprima/statement-break/migrated_0002/expected.json b/test/fixtures/esprima/statement-break/migrated_0002/expected.json
new file mode 100644
index 0000000000..207d4cf4c5
--- /dev/null
+++ b/test/fixtures/esprima/statement-break/migrated_0002/expected.json
@@ -0,0 +1,145 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "LabeledStatement",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": {
+ "type": "WhileStatement",
+ "start": 6,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 13,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [
+ {
+ "type": "BreakStatement",
+ "start": 21,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "done"
+ }
+ }
+ ],
+ "directives": []
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "done"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-break/migrated_0003/actual.js b/test/fixtures/esprima/statement-break/migrated_0003/actual.js
new file mode 100644
index 0000000000..baafda3b83
--- /dev/null
+++ b/test/fixtures/esprima/statement-break/migrated_0003/actual.js
@@ -0,0 +1 @@
+__proto__: while (true) { break __proto__; }
diff --git a/test/fixtures/esprima/statement-break/migrated_0003/expected.json b/test/fixtures/esprima/statement-break/migrated_0003/expected.json
new file mode 100644
index 0000000000..694def79b2
--- /dev/null
+++ b/test/fixtures/esprima/statement-break/migrated_0003/expected.json
@@ -0,0 +1,145 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "LabeledStatement",
+ "start": 0,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "body": {
+ "type": "WhileStatement",
+ "start": 11,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 18,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 24,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "body": [
+ {
+ "type": "BreakStatement",
+ "start": 26,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "name": "__proto__"
+ }
+ }
+ ],
+ "directives": []
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "__proto__"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-continue/migrated_0000/actual.js b/test/fixtures/esprima/statement-continue/migrated_0000/actual.js
new file mode 100644
index 0000000000..f0c83b8f3d
--- /dev/null
+++ b/test/fixtures/esprima/statement-continue/migrated_0000/actual.js
@@ -0,0 +1 @@
+while (true) { continue; }
diff --git a/test/fixtures/esprima/statement-continue/migrated_0000/expected.json b/test/fixtures/esprima/statement-continue/migrated_0000/expected.json
new file mode 100644
index 0000000000..16edee2512
--- /dev/null
+++ b/test/fixtures/esprima/statement-continue/migrated_0000/expected.json
@@ -0,0 +1,99 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "body": [
+ {
+ "type": "ContinueStatement",
+ "start": 15,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "label": null
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-continue/migrated_0001/actual.js b/test/fixtures/esprima/statement-continue/migrated_0001/actual.js
new file mode 100644
index 0000000000..211bd08851
--- /dev/null
+++ b/test/fixtures/esprima/statement-continue/migrated_0001/actual.js
@@ -0,0 +1 @@
+while (true) { continue }
diff --git a/test/fixtures/esprima/statement-continue/migrated_0001/expected.json b/test/fixtures/esprima/statement-continue/migrated_0001/expected.json
new file mode 100644
index 0000000000..d58d0ffa9a
--- /dev/null
+++ b/test/fixtures/esprima/statement-continue/migrated_0001/expected.json
@@ -0,0 +1,99 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "body": [
+ {
+ "type": "ContinueStatement",
+ "start": 15,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "label": null
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-continue/migrated_0002/actual.js b/test/fixtures/esprima/statement-continue/migrated_0002/actual.js
new file mode 100644
index 0000000000..aefcf0471a
--- /dev/null
+++ b/test/fixtures/esprima/statement-continue/migrated_0002/actual.js
@@ -0,0 +1 @@
+done: while (true) { continue done }
diff --git a/test/fixtures/esprima/statement-continue/migrated_0002/expected.json b/test/fixtures/esprima/statement-continue/migrated_0002/expected.json
new file mode 100644
index 0000000000..3d3611769c
--- /dev/null
+++ b/test/fixtures/esprima/statement-continue/migrated_0002/expected.json
@@ -0,0 +1,145 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "LabeledStatement",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "body": {
+ "type": "WhileStatement",
+ "start": 6,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 13,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "body": [
+ {
+ "type": "ContinueStatement",
+ "start": 21,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 30,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "name": "done"
+ }
+ }
+ ],
+ "directives": []
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "done"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-continue/migrated_0003/actual.js b/test/fixtures/esprima/statement-continue/migrated_0003/actual.js
new file mode 100644
index 0000000000..c2c6225464
--- /dev/null
+++ b/test/fixtures/esprima/statement-continue/migrated_0003/actual.js
@@ -0,0 +1 @@
+done: while (true) { continue done; }
diff --git a/test/fixtures/esprima/statement-continue/migrated_0003/expected.json b/test/fixtures/esprima/statement-continue/migrated_0003/expected.json
new file mode 100644
index 0000000000..e2eede95cf
--- /dev/null
+++ b/test/fixtures/esprima/statement-continue/migrated_0003/expected.json
@@ -0,0 +1,145 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "LabeledStatement",
+ "start": 0,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": {
+ "type": "WhileStatement",
+ "start": 6,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 13,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "body": [
+ {
+ "type": "ContinueStatement",
+ "start": 21,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 30,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "name": "done"
+ }
+ }
+ ],
+ "directives": []
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "done"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-continue/migrated_0004/actual.js b/test/fixtures/esprima/statement-continue/migrated_0004/actual.js
new file mode 100644
index 0000000000..c431504a7e
--- /dev/null
+++ b/test/fixtures/esprima/statement-continue/migrated_0004/actual.js
@@ -0,0 +1 @@
+__proto__: while (true) { continue __proto__; }
diff --git a/test/fixtures/esprima/statement-continue/migrated_0004/expected.json b/test/fixtures/esprima/statement-continue/migrated_0004/expected.json
new file mode 100644
index 0000000000..076d4478b5
--- /dev/null
+++ b/test/fixtures/esprima/statement-continue/migrated_0004/expected.json
@@ -0,0 +1,145 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "LabeledStatement",
+ "start": 0,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "body": {
+ "type": "WhileStatement",
+ "start": 11,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 18,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 24,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "body": [
+ {
+ "type": "ContinueStatement",
+ "start": 26,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 44
+ }
+ },
+ "name": "__proto__"
+ }
+ }
+ ],
+ "directives": []
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "__proto__"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-debugger/migrated_0000/actual.js b/test/fixtures/esprima/statement-debugger/migrated_0000/actual.js
new file mode 100644
index 0000000000..eab7469213
--- /dev/null
+++ b/test/fixtures/esprima/statement-debugger/migrated_0000/actual.js
@@ -0,0 +1 @@
+debugger;
diff --git a/test/fixtures/esprima/statement-debugger/migrated_0000/expected.json b/test/fixtures/esprima/statement-debugger/migrated_0000/expected.json
new file mode 100644
index 0000000000..bf36100cfe
--- /dev/null
+++ b/test/fixtures/esprima/statement-debugger/migrated_0000/expected.json
@@ -0,0 +1,48 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "DebuggerStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-empty/migrated_0000/actual.js b/test/fixtures/esprima/statement-empty/migrated_0000/actual.js
new file mode 100644
index 0000000000..092bc2b041
--- /dev/null
+++ b/test/fixtures/esprima/statement-empty/migrated_0000/actual.js
@@ -0,0 +1 @@
+;
diff --git a/test/fixtures/esprima/statement-empty/migrated_0000/expected.json b/test/fixtures/esprima/statement-empty/migrated_0000/expected.json
new file mode 100644
index 0000000000..d76894f1aa
--- /dev/null
+++ b/test/fixtures/esprima/statement-empty/migrated_0000/expected.json
@@ -0,0 +1,48 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "EmptyStatement",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-expression/migrated_0000/actual.js b/test/fixtures/esprima/statement-expression/migrated_0000/actual.js
new file mode 100644
index 0000000000..587be6b4c3
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0000/actual.js
@@ -0,0 +1 @@
+x
diff --git a/test/fixtures/esprima/statement-expression/migrated_0000/expected.json b/test/fixtures/esprima/statement-expression/migrated_0000/expected.json
new file mode 100644
index 0000000000..470ad995ab
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0000/expected.json
@@ -0,0 +1,64 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-expression/migrated_0001/actual.js b/test/fixtures/esprima/statement-expression/migrated_0001/actual.js
new file mode 100644
index 0000000000..b1c634757a
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0001/actual.js
@@ -0,0 +1 @@
+x, y
diff --git a/test/fixtures/esprima/statement-expression/migrated_0001/expected.json b/test/fixtures/esprima/statement-expression/migrated_0001/expected.json
new file mode 100644
index 0000000000..a1f0e67018
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0001/expected.json
@@ -0,0 +1,97 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "expression": {
+ "type": "SequenceExpression",
+ "start": 0,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "expressions": [
+ {
+ "type": "Identifier",
+ "start": 0,
+ "end": 1,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ },
+ "name": "x"
+ },
+ {
+ "type": "Identifier",
+ "start": 3,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "y"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-expression/migrated_0002/actual.js b/test/fixtures/esprima/statement-expression/migrated_0002/actual.js
new file mode 100644
index 0000000000..389d745825
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0002/actual.js
@@ -0,0 +1 @@
+var source = '\\u0061';
diff --git a/test/fixtures/esprima/statement-expression/migrated_0002/expected.json b/test/fixtures/esprima/statement-expression/migrated_0002/expected.json
new file mode 100644
index 0000000000..03f4a58cb3
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0002/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "StringLiteral",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "extra": {
+ "rawValue": "\\u0061",
+ "raw": "'\\\\u0061'"
+ },
+ "value": "\\u0061"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-expression/migrated_0003/actual.js b/test/fixtures/esprima/statement-expression/migrated_0003/actual.js
new file mode 100644
index 0000000000..6524a1c4cf
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0003/actual.js
@@ -0,0 +1 @@
+var source = 'a\\u0061';
diff --git a/test/fixtures/esprima/statement-expression/migrated_0003/expected.json b/test/fixtures/esprima/statement-expression/migrated_0003/expected.json
new file mode 100644
index 0000000000..d292e2317d
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0003/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "StringLiteral",
+ "start": 13,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "extra": {
+ "rawValue": "a\\u0061",
+ "raw": "'a\\\\u0061'"
+ },
+ "value": "a\\u0061"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-expression/migrated_0004/actual.js b/test/fixtures/esprima/statement-expression/migrated_0004/actual.js
new file mode 100644
index 0000000000..d4941e9313
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0004/actual.js
@@ -0,0 +1 @@
+var source = '\\u0061a';
diff --git a/test/fixtures/esprima/statement-expression/migrated_0004/expected.json b/test/fixtures/esprima/statement-expression/migrated_0004/expected.json
new file mode 100644
index 0000000000..58b1ca21f8
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0004/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "StringLiteral",
+ "start": 13,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "extra": {
+ "rawValue": "\\u0061a",
+ "raw": "'\\\\u0061a'"
+ },
+ "value": "\\u0061a"
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-expression/migrated_0005/actual.js b/test/fixtures/esprima/statement-expression/migrated_0005/actual.js
new file mode 100644
index 0000000000..8e5a088c93
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0005/actual.js
@@ -0,0 +1 @@
+var source = '\\u0061a ';
diff --git a/test/fixtures/esprima/statement-expression/migrated_0005/expected.json b/test/fixtures/esprima/statement-expression/migrated_0005/expected.json
new file mode 100644
index 0000000000..b9ab7766f2
--- /dev/null
+++ b/test/fixtures/esprima/statement-expression/migrated_0005/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "source"
+ },
+ "init": {
+ "type": "StringLiteral",
+ "start": 13,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "extra": {
+ "rawValue": "\\u0061a ",
+ "raw": "'\\\\u0061a '"
+ },
+ "value": "\\u0061a "
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-if/.migrated_0003/actual.js b/test/fixtures/esprima/statement-if/.migrated_0003/actual.js
new file mode 100644
index 0000000000..04cb30d31b
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/.migrated_0003/actual.js
@@ -0,0 +1 @@
+if (morning) function a(){}
diff --git a/test/fixtures/esprima/statement-if/migrated_0000/actual.js b/test/fixtures/esprima/statement-if/migrated_0000/actual.js
new file mode 100644
index 0000000000..a9fa4ad3a8
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0000/actual.js
@@ -0,0 +1 @@
+if (morning) goodMorning()
diff --git a/test/fixtures/esprima/statement-if/migrated_0000/expected.json b/test/fixtures/esprima/statement-if/migrated_0000/expected.json
new file mode 100644
index 0000000000..61f0887961
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0000/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "IfStatement",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "test": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "morning"
+ },
+ "consequent": {
+ "type": "ExpressionStatement",
+ "start": 13,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 13,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "goodMorning"
+ },
+ "arguments": []
+ }
+ },
+ "alternate": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-if/migrated_0001/actual.js b/test/fixtures/esprima/statement-if/migrated_0001/actual.js
new file mode 100644
index 0000000000..ceaffa6308
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0001/actual.js
@@ -0,0 +1 @@
+if (morning) (function(){})
diff --git a/test/fixtures/esprima/statement-if/migrated_0001/expected.json b/test/fixtures/esprima/statement-if/migrated_0001/expected.json
new file mode 100644
index 0000000000..640c5691c2
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0001/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "IfStatement",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "test": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "morning"
+ },
+ "consequent": {
+ "type": "ExpressionStatement",
+ "start": 13,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 14,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 24,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ },
+ "alternate": null
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-if/migrated_0002/actual.js b/test/fixtures/esprima/statement-if/migrated_0002/actual.js
new file mode 100644
index 0000000000..8bc4513d98
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0002/actual.js
@@ -0,0 +1 @@
+if (morning) var x = 0;
diff --git a/test/fixtures/esprima/statement-if/migrated_0002/expected.json b/test/fixtures/esprima/statement-if/migrated_0002/expected.json
new file mode 100644
index 0000000000..02fd006838
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0002/expected.json
@@ -0,0 +1,135 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "IfStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "test": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "morning"
+ },
+ "consequent": {
+ "type": "VariableDeclaration",
+ "start": 13,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 17,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "var"
+ },
+ "alternate": null
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-if/migrated_0004/actual.js b/test/fixtures/esprima/statement-if/migrated_0004/actual.js
new file mode 100644
index 0000000000..e7e476724b
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0004/actual.js
@@ -0,0 +1 @@
+if (morning) goodMorning(); else goodDay()
diff --git a/test/fixtures/esprima/statement-if/migrated_0004/expected.json b/test/fixtures/esprima/statement-if/migrated_0004/expected.json
new file mode 100644
index 0000000000..720f53798d
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0004/expected.json
@@ -0,0 +1,158 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "IfStatement",
+ "start": 0,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "test": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "morning"
+ },
+ "consequent": {
+ "type": "ExpressionStatement",
+ "start": 13,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 13,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "goodMorning"
+ },
+ "arguments": []
+ }
+ },
+ "alternate": {
+ "type": "ExpressionStatement",
+ "start": 33,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 33,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "name": "goodDay"
+ },
+ "arguments": []
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-if/migrated_0005/actual.js b/test/fixtures/esprima/statement-if/migrated_0005/actual.js
new file mode 100644
index 0000000000..893e85746c
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0005/actual.js
@@ -0,0 +1,2 @@
+if (true) that()
+; else;
diff --git a/test/fixtures/esprima/statement-if/migrated_0005/expected.json b/test/fixtures/esprima/statement-if/migrated_0005/expected.json
new file mode 100644
index 0000000000..baa36356a5
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0005/expected.json
@@ -0,0 +1,127 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "IfStatement",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": true
+ },
+ "consequent": {
+ "type": "ExpressionStatement",
+ "start": 10,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 1
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 10,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "that"
+ },
+ "arguments": []
+ }
+ },
+ "alternate": {
+ "type": "EmptyStatement",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-if/migrated_0006/actual.js b/test/fixtures/esprima/statement-if/migrated_0006/actual.js
new file mode 100644
index 0000000000..4253fa10bc
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0006/actual.js
@@ -0,0 +1 @@
+if (true) that(); else;
diff --git a/test/fixtures/esprima/statement-if/migrated_0006/expected.json b/test/fixtures/esprima/statement-if/migrated_0006/expected.json
new file mode 100644
index 0000000000..2f9b5c6964
--- /dev/null
+++ b/test/fixtures/esprima/statement-if/migrated_0006/expected.json
@@ -0,0 +1,127 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "IfStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": true
+ },
+ "consequent": {
+ "type": "ExpressionStatement",
+ "start": 10,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 10,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "that"
+ },
+ "arguments": []
+ }
+ },
+ "alternate": {
+ "type": "EmptyStatement",
+ "start": 22,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/.migrated_0021/actual.js b/test/fixtures/esprima/statement-iteration/.migrated_0021/actual.js
new file mode 100644
index 0000000000..01e8d6930a
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/.migrated_0021/actual.js
@@ -0,0 +1 @@
+for (var x = y = z in q);
diff --git a/test/fixtures/esprima/statement-iteration/.migrated_0021/expected.json b/test/fixtures/esprima/statement-iteration/.migrated_0021/expected.json
new file mode 100644
index 0000000000..20d1b7032f
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/.migrated_0021/expected.json
@@ -0,0 +1,176 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForInStatement",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "AssignmentExpression",
+ "start": 13,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "y"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "z"
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "q"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/.pattern-in-for-in/actual.js b/test/fixtures/esprima/statement-iteration/.pattern-in-for-in/actual.js
new file mode 100644
index 0000000000..7bfdb2f282
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/.pattern-in-for-in/actual.js
@@ -0,0 +1 @@
+for([a,b[a],{c,d=e,[f]:[g,h().a,(0).k,...i[0]]}] in 0);
diff --git a/test/fixtures/esprima/statement-iteration/const_forin/actual.js b/test/fixtures/esprima/statement-iteration/const_forin/actual.js
new file mode 100644
index 0000000000..48da176a2b
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/const_forin/actual.js
@@ -0,0 +1 @@
+for (const x in list) process(x);
diff --git a/test/fixtures/esprima/statement-iteration/const_forin/expected.json b/test/fixtures/esprima/statement-iteration/const_forin/expected.json
new file mode 100644
index 0000000000..24f754ab5a
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/const_forin/expected.json
@@ -0,0 +1,178 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForInStatement",
+ "start": 0,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "x"
+ },
+ "init": null
+ }
+ ],
+ "kind": "const"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "list"
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 22,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "process"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "x"
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/for-statement-with-seq/actual.js b/test/fixtures/esprima/statement-iteration/for-statement-with-seq/actual.js
new file mode 100644
index 0000000000..b44b084362
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/for-statement-with-seq/actual.js
@@ -0,0 +1 @@
+for(a,b,c;;);
diff --git a/test/fixtures/esprima/statement-iteration/for-statement-with-seq/expected.json b/test/fixtures/esprima/statement-iteration/for-statement-with-seq/expected.json
new file mode 100644
index 0000000000..caaf4a9a96
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/for-statement-with-seq/expected.json
@@ -0,0 +1,130 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "init": {
+ "type": "SequenceExpression",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expressions": [
+ {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "b"
+ },
+ {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "c"
+ }
+ ]
+ },
+ "test": null,
+ "update": null,
+ "body": {
+ "type": "EmptyStatement",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0000/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0000/actual.js
new file mode 100644
index 0000000000..02e1c8fda3
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0000/actual.js
@@ -0,0 +1 @@
+do keep(); while (true)
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json
new file mode 100644
index 0000000000..52f64a4d6b
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "DoWhileStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 3,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 3,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "keep"
+ },
+ "arguments": []
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 18,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "value": true
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0001/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0001/actual.js
new file mode 100644
index 0000000000..25668b5db4
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0001/actual.js
@@ -0,0 +1 @@
+do keep(); while (true);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json
new file mode 100644
index 0000000000..04998adb58
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "DoWhileStatement",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 3,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 3,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "keep"
+ },
+ "arguments": []
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 18,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "value": true
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0002/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0002/actual.js
new file mode 100644
index 0000000000..7c6b478431
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0002/actual.js
@@ -0,0 +1 @@
+do { x++; y--; } while (x < 10)
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json
new file mode 100644
index 0000000000..8e9ac0c09e
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json
@@ -0,0 +1,215 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "DoWhileStatement",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 3,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 5,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 5,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "x"
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 10,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 10,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "operator": "--",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ],
+ "directives": []
+ },
+ "test": {
+ "type": "BinaryExpression",
+ "start": 24,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "x"
+ },
+ "operator": "<",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 28,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0003/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0003/actual.js
new file mode 100644
index 0000000000..d766db4e65
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0003/actual.js
@@ -0,0 +1 @@
+{ do { } while (false) false }
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json
new file mode 100644
index 0000000000..d9bf919d8c
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json
@@ -0,0 +1,131 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "BlockStatement",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [
+ {
+ "type": "DoWhileStatement",
+ "start": 2,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 5,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "body": [],
+ "directives": []
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 16,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "value": false
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 23,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "expression": {
+ "type": "BooleanLiteral",
+ "start": 23,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": false
+ }
+ }
+ ],
+ "directives": []
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0004/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0004/actual.js
new file mode 100644
index 0000000000..d36ffddeff
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0004/actual.js
@@ -0,0 +1 @@
+do that();while (true)
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json
new file mode 100644
index 0000000000..746642c0a5
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "DoWhileStatement",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 3,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 3,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "that"
+ },
+ "arguments": []
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 17,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "value": true
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0005/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0005/actual.js
new file mode 100644
index 0000000000..4977449830
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0005/actual.js
@@ -0,0 +1,2 @@
+do that()
+;while (true)
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json
new file mode 100644
index 0000000000..5019d62edd
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "DoWhileStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 3,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 2,
+ "column": 1
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 3,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "that"
+ },
+ "arguments": []
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 18,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ },
+ "value": true
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0006/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0006/actual.js
new file mode 100644
index 0000000000..850fa0626e
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0006/actual.js
@@ -0,0 +1 @@
+while (true) doSomething()
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json
new file mode 100644
index 0000000000..b154f386f7
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json
@@ -0,0 +1,112 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 7,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 13,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 13,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "doSomething"
+ },
+ "arguments": []
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0007/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0007/actual.js
new file mode 100644
index 0000000000..fdf7b8865e
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0007/actual.js
@@ -0,0 +1 @@
+while (x < 10) { x++; y--; }
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json
new file mode 100644
index 0000000000..0ca7f0f400
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json
@@ -0,0 +1,215 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WhileStatement",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "test": {
+ "type": "BinaryExpression",
+ "start": 7,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "x"
+ },
+ "operator": "<",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 11,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 17,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "x"
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 22,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "UpdateExpression",
+ "start": 22,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "operator": "--",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0008/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0008/actual.js
new file mode 100644
index 0000000000..4ab96f0961
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0008/actual.js
@@ -0,0 +1 @@
+for(;;);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0008/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0008/expected.json
new file mode 100644
index 0000000000..9474ed02f5
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0008/expected.json
@@ -0,0 +1,66 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForStatement",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "init": null,
+ "test": null,
+ "update": null,
+ "body": {
+ "type": "EmptyStatement",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0009/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0009/actual.js
new file mode 100644
index 0000000000..2454953cbe
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0009/actual.js
@@ -0,0 +1 @@
+for(;;){}
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0009/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0009/expected.json
new file mode 100644
index 0000000000..ee4511c5df
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0009/expected.json
@@ -0,0 +1,67 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForStatement",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "init": null,
+ "test": null,
+ "update": null,
+ "body": {
+ "type": "BlockStatement",
+ "start": 7,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0010/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0010/actual.js
new file mode 100644
index 0000000000..0031d64209
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0010/actual.js
@@ -0,0 +1 @@
+for(x = 0;;);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json
new file mode 100644
index 0000000000..3b790cdecf
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json
@@ -0,0 +1,118 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "init": {
+ "type": "AssignmentExpression",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ },
+ "test": null,
+ "update": null,
+ "body": {
+ "type": "EmptyStatement",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0011/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0011/actual.js
new file mode 100644
index 0000000000..efc0f031b7
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0011/actual.js
@@ -0,0 +1 @@
+for(var x = 0;;);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json
new file mode 100644
index 0000000000..e7c1db4ec7
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json
@@ -0,0 +1,135 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "init": {
+ "type": "VariableDeclaration",
+ "start": 4,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 8,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "var"
+ },
+ "test": null,
+ "update": null,
+ "body": {
+ "type": "EmptyStatement",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0012/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0012/actual.js
new file mode 100644
index 0000000000..cec50c4b9c
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0012/actual.js
@@ -0,0 +1 @@
+for(let x = 0;;);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json
new file mode 100644
index 0000000000..c6da62d7c5
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json
@@ -0,0 +1,135 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForStatement",
+ "start": 0,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "init": {
+ "type": "VariableDeclaration",
+ "start": 4,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 8,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ "test": null,
+ "update": null,
+ "body": {
+ "type": "EmptyStatement",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0013/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0013/actual.js
new file mode 100644
index 0000000000..97a393701c
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0013/actual.js
@@ -0,0 +1 @@
+for(var x = 0, y = 1;;);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json
new file mode 100644
index 0000000000..eacbe24384
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForStatement",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "init": {
+ "type": "VariableDeclaration",
+ "start": 4,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 8,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 15,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "y"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
+ }
+ ],
+ "kind": "var"
+ },
+ "test": null,
+ "update": null,
+ "body": {
+ "type": "EmptyStatement",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0014/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0014/actual.js
new file mode 100644
index 0000000000..bfa5a751d8
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0014/actual.js
@@ -0,0 +1 @@
+for(x = 0; x < 42;);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json
new file mode 100644
index 0000000000..7f485aaf19
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForStatement",
+ "start": 0,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "init": {
+ "type": "AssignmentExpression",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ },
+ "test": {
+ "type": "BinaryExpression",
+ "start": 11,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "x"
+ },
+ "operator": "<",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ },
+ "update": null,
+ "body": {
+ "type": "EmptyStatement",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0015/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0015/actual.js
new file mode 100644
index 0000000000..252fa9391b
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0015/actual.js
@@ -0,0 +1 @@
+for(x = 0; x < 42; x++);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json
new file mode 100644
index 0000000000..0c6bf2a092
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json
@@ -0,0 +1,201 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForStatement",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "init": {
+ "type": "AssignmentExpression",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ },
+ "test": {
+ "type": "BinaryExpression",
+ "start": 11,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "x"
+ },
+ "operator": "<",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ },
+ "update": {
+ "type": "UpdateExpression",
+ "start": 19,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "x"
+ }
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0016/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0016/actual.js
new file mode 100644
index 0000000000..3c1e6af8df
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0016/actual.js
@@ -0,0 +1 @@
+for(x = 0; x < 42; x++) process(x);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json
new file mode 100644
index 0000000000..586cbf67f5
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json
@@ -0,0 +1,250 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForStatement",
+ "start": 0,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "init": {
+ "type": "AssignmentExpression",
+ "start": 4,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ },
+ "test": {
+ "type": "BinaryExpression",
+ "start": 11,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "x"
+ },
+ "operator": "<",
+ "right": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ },
+ "update": {
+ "type": "UpdateExpression",
+ "start": 19,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "operator": "++",
+ "prefix": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "x"
+ }
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 24,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 24,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "process"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "x"
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0017/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0017/actual.js
new file mode 100644
index 0000000000..5b8cba78ae
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0017/actual.js
@@ -0,0 +1 @@
+for(x in list) process(x);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0017/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0017/expected.json
new file mode 100644
index 0000000000..f95b2f15a7
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0017/expected.json
@@ -0,0 +1,144 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForInStatement",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "list"
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 15,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 15,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "process"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "x"
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0018/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0018/actual.js
new file mode 100644
index 0000000000..f3649e96e1
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0018/actual.js
@@ -0,0 +1 @@
+for (var x in list) process(x);
diff --git a/test/fixtures/core/uncategorised/248/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0018/expected.json
similarity index 70%
rename from test/fixtures/core/uncategorised/248/expected.json
rename to test/fixtures/esprima/statement-iteration/migrated_0018/expected.json
index 7b65e7a6c3..50d29b5d32 100644
--- a/test/fixtures/core/uncategorised/248/expected.json
+++ b/test/fixtures/esprima/statement-iteration/migrated_0018/expected.json
@@ -1,7 +1,7 @@
{
"type": "File",
"start": 0,
- "end": 36,
+ "end": 31,
"loc": {
"start": {
"line": 1,
@@ -9,13 +9,13 @@
},
"end": {
"line": 1,
- "column": 36
+ "column": 31
}
},
"program": {
"type": "Program",
"start": 0,
- "end": 36,
+ "end": 31,
"loc": {
"start": {
"line": 1,
@@ -23,7 +23,7 @@
},
"end": {
"line": 1,
- "column": 36
+ "column": 31
}
},
"sourceType": "script",
@@ -31,7 +31,7 @@
{
"type": "ForInStatement",
"start": 0,
- "end": 36,
+ "end": 31,
"loc": {
"start": {
"line": 1,
@@ -39,13 +39,13 @@
},
"end": {
"line": 1,
- "column": 36
+ "column": 31
}
},
"left": {
"type": "VariableDeclaration",
"start": 5,
- "end": 15,
+ "end": 10,
"loc": {
"start": {
"line": 1,
@@ -53,14 +53,14 @@
},
"end": {
"line": 1,
- "column": 15
+ "column": 10
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 9,
- "end": 15,
+ "end": 10,
"loc": {
"start": {
"line": 1,
@@ -68,7 +68,7 @@
},
"end": {
"line": 1,
- "column": 15
+ "column": 10
}
},
"id": {
@@ -87,84 +87,67 @@
},
"name": "x"
},
- "init": {
- "type": "Literal",
- "start": 13,
- "end": 15,
- "loc": {
- "start": {
- "line": 1,
- "column": 13
- },
- "end": {
- "line": 1,
- "column": 15
- }
- },
- "value": 42,
- "rawValue": 42,
- "raw": "42"
- }
+ "init": null
}
],
"kind": "var"
},
"right": {
"type": "Identifier",
- "start": 19,
- "end": 23,
+ "start": 14,
+ "end": 18,
"loc": {
"start": {
"line": 1,
- "column": 19
+ "column": 14
},
"end": {
"line": 1,
- "column": 23
+ "column": 18
}
},
"name": "list"
},
"body": {
"type": "ExpressionStatement",
- "start": 25,
- "end": 36,
+ "start": 20,
+ "end": 31,
"loc": {
"start": {
"line": 1,
- "column": 25
+ "column": 20
},
"end": {
"line": 1,
- "column": 36
+ "column": 31
}
},
"expression": {
"type": "CallExpression",
- "start": 25,
- "end": 35,
+ "start": 20,
+ "end": 30,
"loc": {
"start": {
"line": 1,
- "column": 25
+ "column": 20
},
"end": {
"line": 1,
- "column": 35
+ "column": 30
}
},
"callee": {
"type": "Identifier",
- "start": 25,
- "end": 32,
+ "start": 20,
+ "end": 27,
"loc": {
"start": {
"line": 1,
- "column": 25
+ "column": 20
},
"end": {
"line": 1,
- "column": 32
+ "column": 27
}
},
"name": "process"
@@ -172,16 +155,16 @@
"arguments": [
{
"type": "Identifier",
- "start": 33,
- "end": 34,
+ "start": 28,
+ "end": 29,
"loc": {
"start": {
"line": 1,
- "column": 33
+ "column": 28
},
"end": {
"line": 1,
- "column": 34
+ "column": 29
}
},
"name": "x"
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0020/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0020/actual.js
new file mode 100644
index 0000000000..ef04e49f91
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0020/actual.js
@@ -0,0 +1 @@
+for (let x in list) process(x);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0020/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0020/expected.json
new file mode 100644
index 0000000000..12d30b3dd3
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0020/expected.json
@@ -0,0 +1,178 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForInStatement",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "left": {
+ "type": "VariableDeclaration",
+ "start": 5,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "x"
+ },
+ "init": null
+ }
+ ],
+ "kind": "let"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "list"
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 20,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "process"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 28,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "x"
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0024/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0024/actual.js
new file mode 100644
index 0000000000..6d08a0e3ac
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0024/actual.js
@@ -0,0 +1 @@
+for (a[b in c] in d);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0024/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0024/expected.json
new file mode 100644
index 0000000000..5eba72f1c0
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0024/expected.json
@@ -0,0 +1,159 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForInStatement",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "left": {
+ "type": "MemberExpression",
+ "start": 5,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ },
+ "property": {
+ "type": "BinaryExpression",
+ "start": 7,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "b"
+ },
+ "operator": "in",
+ "right": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "c"
+ }
+ },
+ "computed": true
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "d"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0025/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0025/actual.js
new file mode 100644
index 0000000000..74abefc28d
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0025/actual.js
@@ -0,0 +1 @@
+for (a(b in c)[0] in d);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json
new file mode 100644
index 0000000000..1f99f8deed
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json
@@ -0,0 +1,197 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForInStatement",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "left": {
+ "type": "MemberExpression",
+ "start": 5,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "object": {
+ "type": "CallExpression",
+ "start": 5,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ },
+ "arguments": [
+ {
+ "type": "BinaryExpression",
+ "start": 7,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "b"
+ },
+ "operator": "in",
+ "right": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "c"
+ }
+ }
+ ]
+ },
+ "property": {
+ "type": "NumberLiteral",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ },
+ "computed": true
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "d"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0026/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0026/actual.js
new file mode 100644
index 0000000000..6c141a0c23
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0026/actual.js
@@ -0,0 +1 @@
+for (a.in in a);
diff --git a/test/fixtures/esprima/statement-iteration/migrated_0026/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0026/expected.json
new file mode 100644
index 0000000000..df5bd2f21b
--- /dev/null
+++ b/test/fixtures/esprima/statement-iteration/migrated_0026/expected.json
@@ -0,0 +1,127 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ForInStatement",
+ "start": 0,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "left": {
+ "type": "MemberExpression",
+ "start": 5,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "a"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "in"
+ },
+ "computed": false
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "a"
+ },
+ "body": {
+ "type": "EmptyStatement",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-labelled/migrated_0000/actual.js b/test/fixtures/esprima/statement-labelled/migrated_0000/actual.js
new file mode 100644
index 0000000000..925da26ad6
--- /dev/null
+++ b/test/fixtures/esprima/statement-labelled/migrated_0000/actual.js
@@ -0,0 +1 @@
+start: for (;;) break start
diff --git a/test/fixtures/esprima/statement-labelled/migrated_0000/expected.json b/test/fixtures/esprima/statement-labelled/migrated_0000/expected.json
new file mode 100644
index 0000000000..ea2201a00e
--- /dev/null
+++ b/test/fixtures/esprima/statement-labelled/migrated_0000/expected.json
@@ -0,0 +1,113 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "LabeledStatement",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "body": {
+ "type": "ForStatement",
+ "start": 7,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "init": null,
+ "test": null,
+ "update": null,
+ "body": {
+ "type": "BreakStatement",
+ "start": 16,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 22,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "start"
+ }
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "start"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-labelled/migrated_0001/actual.js b/test/fixtures/esprima/statement-labelled/migrated_0001/actual.js
new file mode 100644
index 0000000000..c9f77462c3
--- /dev/null
+++ b/test/fixtures/esprima/statement-labelled/migrated_0001/actual.js
@@ -0,0 +1 @@
+start: while (true) break start
diff --git a/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json b/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json
new file mode 100644
index 0000000000..5157602658
--- /dev/null
+++ b/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json
@@ -0,0 +1,127 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "LabeledStatement",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "body": {
+ "type": "WhileStatement",
+ "start": 7,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "test": {
+ "type": "BooleanLiteral",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "value": true
+ },
+ "body": {
+ "type": "BreakStatement",
+ "start": 20,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "start"
+ }
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "start"
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-labelled/migrated_0002/actual.js b/test/fixtures/esprima/statement-labelled/migrated_0002/actual.js
new file mode 100644
index 0000000000..3b8d12bfe3
--- /dev/null
+++ b/test/fixtures/esprima/statement-labelled/migrated_0002/actual.js
@@ -0,0 +1 @@
+__proto__: test
diff --git a/test/fixtures/esprima/statement-labelled/migrated_0002/expected.json b/test/fixtures/esprima/statement-labelled/migrated_0002/expected.json
new file mode 100644
index 0000000000..c1996f9d1b
--- /dev/null
+++ b/test/fixtures/esprima/statement-labelled/migrated_0002/expected.json
@@ -0,0 +1,95 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "LabeledStatement",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 11,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "test"
+ }
+ },
+ "label": {
+ "type": "Identifier",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "__proto__"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-return/migrated_0000/actual.js b/test/fixtures/esprima/statement-return/migrated_0000/actual.js
new file mode 100644
index 0000000000..75545f4ec5
--- /dev/null
+++ b/test/fixtures/esprima/statement-return/migrated_0000/actual.js
@@ -0,0 +1 @@
+(function(){ return })
diff --git a/test/fixtures/esprima/statement-return/migrated_0000/expected.json b/test/fixtures/esprima/statement-return/migrated_0000/expected.json
new file mode 100644
index 0000000000..3811851cf2
--- /dev/null
+++ b/test/fixtures/esprima/statement-return/migrated_0000/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 11,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 13,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "argument": null
+ }
+ ],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-return/migrated_0001/actual.js b/test/fixtures/esprima/statement-return/migrated_0001/actual.js
new file mode 100644
index 0000000000..775341351c
--- /dev/null
+++ b/test/fixtures/esprima/statement-return/migrated_0001/actual.js
@@ -0,0 +1 @@
+(function(){ return; })
diff --git a/test/fixtures/esprima/statement-return/migrated_0001/expected.json b/test/fixtures/esprima/statement-return/migrated_0001/expected.json
new file mode 100644
index 0000000000..cfc30f8e34
--- /dev/null
+++ b/test/fixtures/esprima/statement-return/migrated_0001/expected.json
@@ -0,0 +1,105 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 11,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 13,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "argument": null
+ }
+ ],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-return/migrated_0002/actual.js b/test/fixtures/esprima/statement-return/migrated_0002/actual.js
new file mode 100644
index 0000000000..c641c6eba2
--- /dev/null
+++ b/test/fixtures/esprima/statement-return/migrated_0002/actual.js
@@ -0,0 +1 @@
+(function(){ return x; })
diff --git a/test/fixtures/esprima/statement-return/migrated_0002/expected.json b/test/fixtures/esprima/statement-return/migrated_0002/expected.json
new file mode 100644
index 0000000000..7e253235fc
--- /dev/null
+++ b/test/fixtures/esprima/statement-return/migrated_0002/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 11,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "x"
+ }
+ }
+ ],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-return/migrated_0003/actual.js b/test/fixtures/esprima/statement-return/migrated_0003/actual.js
new file mode 100644
index 0000000000..81b8918812
--- /dev/null
+++ b/test/fixtures/esprima/statement-return/migrated_0003/actual.js
@@ -0,0 +1 @@
+(function(){ return x * y })
diff --git a/test/fixtures/esprima/statement-return/migrated_0003/expected.json b/test/fixtures/esprima/statement-return/migrated_0003/expected.json
new file mode 100644
index 0000000000..d4f71c39ad
--- /dev/null
+++ b/test/fixtures/esprima/statement-return/migrated_0003/expected.json
@@ -0,0 +1,152 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "expression": {
+ "type": "FunctionExpression",
+ "start": 1,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 11,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 13,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "argument": {
+ "type": "BinaryExpression",
+ "start": 20,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "x"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ],
+ "directives": []
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-switch/migrated_0000/actual.js b/test/fixtures/esprima/statement-switch/migrated_0000/actual.js
new file mode 100644
index 0000000000..25005bdb2a
--- /dev/null
+++ b/test/fixtures/esprima/statement-switch/migrated_0000/actual.js
@@ -0,0 +1 @@
+switch (x) {}
diff --git a/test/fixtures/esprima/statement-switch/migrated_0000/expected.json b/test/fixtures/esprima/statement-switch/migrated_0000/expected.json
new file mode 100644
index 0000000000..e48fd0f035
--- /dev/null
+++ b/test/fixtures/esprima/statement-switch/migrated_0000/expected.json
@@ -0,0 +1,65 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "SwitchStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "discriminant": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "x"
+ },
+ "cases": []
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-switch/migrated_0001/actual.js b/test/fixtures/esprima/statement-switch/migrated_0001/actual.js
new file mode 100644
index 0000000000..412007b26f
--- /dev/null
+++ b/test/fixtures/esprima/statement-switch/migrated_0001/actual.js
@@ -0,0 +1 @@
+switch (answer) { case 42: hi(); break; }
diff --git a/test/fixtures/esprima/statement-switch/migrated_0001/expected.json b/test/fixtures/esprima/statement-switch/migrated_0001/expected.json
new file mode 100644
index 0000000000..6251d143ae
--- /dev/null
+++ b/test/fixtures/esprima/statement-switch/migrated_0001/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "SwitchStatement",
+ "start": 0,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "discriminant": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "answer"
+ },
+ "cases": [
+ {
+ "type": "SwitchCase",
+ "start": 18,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "consequent": [
+ {
+ "type": "ExpressionStatement",
+ "start": 27,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 27,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "hi"
+ },
+ "arguments": []
+ }
+ },
+ {
+ "type": "BreakStatement",
+ "start": 33,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "label": null
+ }
+ ],
+ "test": {
+ "type": "NumberLiteral",
+ "start": 23,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ]
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-switch/migrated_0002/actual.js b/test/fixtures/esprima/statement-switch/migrated_0002/actual.js
new file mode 100644
index 0000000000..dcf477dadd
--- /dev/null
+++ b/test/fixtures/esprima/statement-switch/migrated_0002/actual.js
@@ -0,0 +1 @@
+switch (answer) { case 42: hi(); break; default: break }
diff --git a/test/fixtures/esprima/statement-switch/migrated_0002/expected.json b/test/fixtures/esprima/statement-switch/migrated_0002/expected.json
new file mode 100644
index 0000000000..96908f65a6
--- /dev/null
+++ b/test/fixtures/esprima/statement-switch/migrated_0002/expected.json
@@ -0,0 +1,201 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "SwitchStatement",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "discriminant": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "answer"
+ },
+ "cases": [
+ {
+ "type": "SwitchCase",
+ "start": 18,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "consequent": [
+ {
+ "type": "ExpressionStatement",
+ "start": 27,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 27,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "hi"
+ },
+ "arguments": []
+ }
+ },
+ {
+ "type": "BreakStatement",
+ "start": 33,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "label": null
+ }
+ ],
+ "test": {
+ "type": "NumberLiteral",
+ "start": 23,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ },
+ {
+ "type": "SwitchCase",
+ "start": 40,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "consequent": [
+ {
+ "type": "BreakStatement",
+ "start": 49,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 54
+ }
+ },
+ "label": null
+ }
+ ],
+ "test": null
+ }
+ ]
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-throw/migrated_0000/actual.js b/test/fixtures/esprima/statement-throw/migrated_0000/actual.js
new file mode 100644
index 0000000000..c7426bffc6
--- /dev/null
+++ b/test/fixtures/esprima/statement-throw/migrated_0000/actual.js
@@ -0,0 +1 @@
+throw x;
diff --git a/test/fixtures/esprima/statement-throw/migrated_0000/expected.json b/test/fixtures/esprima/statement-throw/migrated_0000/expected.json
new file mode 100644
index 0000000000..0e9f3c0da0
--- /dev/null
+++ b/test/fixtures/esprima/statement-throw/migrated_0000/expected.json
@@ -0,0 +1,64 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "start": 0,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-throw/migrated_0001/actual.js b/test/fixtures/esprima/statement-throw/migrated_0001/actual.js
new file mode 100644
index 0000000000..22d107700d
--- /dev/null
+++ b/test/fixtures/esprima/statement-throw/migrated_0001/actual.js
@@ -0,0 +1 @@
+throw x * y
diff --git a/test/fixtures/esprima/statement-throw/migrated_0001/expected.json b/test/fixtures/esprima/statement-throw/migrated_0001/expected.json
new file mode 100644
index 0000000000..91f3d0ffa7
--- /dev/null
+++ b/test/fixtures/esprima/statement-throw/migrated_0001/expected.json
@@ -0,0 +1,96 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "argument": {
+ "type": "BinaryExpression",
+ "start": 6,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "operator": "*",
+ "right": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "y"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-throw/migrated_0002/actual.js b/test/fixtures/esprima/statement-throw/migrated_0002/actual.js
new file mode 100644
index 0000000000..b1590926c9
--- /dev/null
+++ b/test/fixtures/esprima/statement-throw/migrated_0002/actual.js
@@ -0,0 +1 @@
+throw { message: "Error" }
diff --git a/test/fixtures/esprima/statement-throw/migrated_0002/expected.json b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json
new file mode 100644
index 0000000000..1586888a8b
--- /dev/null
+++ b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json
@@ -0,0 +1,120 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "argument": {
+ "type": "ObjectExpression",
+ "start": 6,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 8,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 8,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "message"
+ },
+ "value": {
+ "type": "StringLiteral",
+ "start": 17,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "extra": {
+ "rawValue": "Error",
+ "raw": "\"Error\""
+ },
+ "value": "Error"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-try/migrated_0000/actual.js b/test/fixtures/esprima/statement-try/migrated_0000/actual.js
new file mode 100644
index 0000000000..f264c628b5
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0000/actual.js
@@ -0,0 +1 @@
+try { } catch (e) { }
diff --git a/test/fixtures/esprima/statement-try/migrated_0000/expected.json b/test/fixtures/esprima/statement-try/migrated_0000/expected.json
new file mode 100644
index 0000000000..49a3324324
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0000/expected.json
@@ -0,0 +1,113 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "body": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 8,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "e"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-try/migrated_0001/actual.js b/test/fixtures/esprima/statement-try/migrated_0001/actual.js
new file mode 100644
index 0000000000..5d9613956b
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0001/actual.js
@@ -0,0 +1 @@
+try { } catch (eval) { }
diff --git a/test/fixtures/esprima/statement-try/migrated_0001/expected.json b/test/fixtures/esprima/statement-try/migrated_0001/expected.json
new file mode 100644
index 0000000000..4fa8f999b5
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0001/expected.json
@@ -0,0 +1,113 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "body": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 8,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "eval"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "body": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-try/migrated_0002/actual.js b/test/fixtures/esprima/statement-try/migrated_0002/actual.js
new file mode 100644
index 0000000000..b2a574c326
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0002/actual.js
@@ -0,0 +1 @@
+try { } catch (arguments) { }
diff --git a/test/fixtures/esprima/statement-try/migrated_0002/expected.json b/test/fixtures/esprima/statement-try/migrated_0002/expected.json
new file mode 100644
index 0000000000..42cc2e8bf7
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0002/expected.json
@@ -0,0 +1,113 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "body": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 8,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "arguments"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 26,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "body": []
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-try/migrated_0003/actual.js b/test/fixtures/esprima/statement-try/migrated_0003/actual.js
new file mode 100644
index 0000000000..83fb8d6e80
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0003/actual.js
@@ -0,0 +1 @@
+try { } catch (e) { say(e) }
diff --git a/test/fixtures/esprima/statement-try/migrated_0003/expected.json b/test/fixtures/esprima/statement-try/migrated_0003/expected.json
new file mode 100644
index 0000000000..bb353db32f
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0003/expected.json
@@ -0,0 +1,178 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "body": []
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 8,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "e"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 20,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 20,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "say"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "e"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-try/migrated_0004/actual.js b/test/fixtures/esprima/statement-try/migrated_0004/actual.js
new file mode 100644
index 0000000000..6c596bdefb
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0004/actual.js
@@ -0,0 +1 @@
+try { } finally { cleanup(stuff) }
diff --git a/test/fixtures/esprima/statement-try/migrated_0004/expected.json b/test/fixtures/esprima/statement-try/migrated_0004/expected.json
new file mode 100644
index 0000000000..ca8f6bd080
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0004/expected.json
@@ -0,0 +1,147 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "body": []
+ },
+ "handler": null,
+ "guardedHandlers": [],
+ "finalizer": {
+ "type": "BlockStatement",
+ "start": 16,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 18,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 18,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "cleanup"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "stuff"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-try/migrated_0005/actual.js b/test/fixtures/esprima/statement-try/migrated_0005/actual.js
new file mode 100644
index 0000000000..ea86126dc6
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0005/actual.js
@@ -0,0 +1 @@
+try { doThat(); } catch (e) { say(e) }
diff --git a/test/fixtures/esprima/statement-try/migrated_0005/expected.json b/test/fixtures/esprima/statement-try/migrated_0005/expected.json
new file mode 100644
index 0000000000..291705c18b
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0005/expected.json
@@ -0,0 +1,226 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 6,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 6,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "doThat"
+ },
+ "arguments": []
+ }
+ }
+ ]
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 18,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "name": "e"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 28,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 30,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 30,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 30,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "say"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 34,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "name": "e"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": null
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-try/migrated_0006/actual.js b/test/fixtures/esprima/statement-try/migrated_0006/actual.js
new file mode 100644
index 0000000000..2557ec761a
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0006/actual.js
@@ -0,0 +1 @@
+try { doThat(); } catch (e) { say(e) } finally { cleanup(stuff) }
diff --git a/test/fixtures/esprima/statement-try/migrated_0006/expected.json b/test/fixtures/esprima/statement-try/migrated_0006/expected.json
new file mode 100644
index 0000000000..9dd799f3ee
--- /dev/null
+++ b/test/fixtures/esprima/statement-try/migrated_0006/expected.json
@@ -0,0 +1,306 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 65,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 65
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 65,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 65
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "TryStatement",
+ "start": 0,
+ "end": 65,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 65
+ }
+ },
+ "block": {
+ "type": "BlockStatement",
+ "start": 4,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 6,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 6,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "doThat"
+ },
+ "arguments": []
+ }
+ }
+ ]
+ },
+ "handler": {
+ "type": "CatchClause",
+ "start": 18,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "param": {
+ "type": "Identifier",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "name": "e"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 28,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 30,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 30,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 30,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "say"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 34,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "name": "e"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "guardedHandlers": [],
+ "finalizer": {
+ "type": "BlockStatement",
+ "start": 47,
+ "end": 65,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 65
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 49,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 49,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 49,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 49
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "name": "cleanup"
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 57,
+ "end": 62,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 57
+ },
+ "end": {
+ "line": 1,
+ "column": 62
+ }
+ },
+ "name": "stuff"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-variable/complex-pattern-requires-init/actual.js b/test/fixtures/esprima/statement-variable/complex-pattern-requires-init/actual.js
new file mode 100644
index 0000000000..9fc941b2c1
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/complex-pattern-requires-init/actual.js
@@ -0,0 +1 @@
+var []
diff --git a/test/fixtures/esprima/statement-variable/complex-pattern-requires-init/options.json b/test/fixtures/esprima/statement-variable/complex-pattern-requires-init/options.json
new file mode 100644
index 0000000000..8cb567ee77
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/complex-pattern-requires-init/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Complex binding patterns require an initialization value (1:6)"
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-variable/migrated_0000/actual.js b/test/fixtures/esprima/statement-variable/migrated_0000/actual.js
new file mode 100644
index 0000000000..2660e277b1
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0000/actual.js
@@ -0,0 +1 @@
+var x
diff --git a/test/fixtures/esprima/statement-variable/migrated_0000/expected.json b/test/fixtures/esprima/statement-variable/migrated_0000/expected.json
new file mode 100644
index 0000000000..ec2dadfcf0
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0000/expected.json
@@ -0,0 +1,83 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-variable/migrated_0001/actual.js b/test/fixtures/esprima/statement-variable/migrated_0001/actual.js
new file mode 100644
index 0000000000..fecb2697c9
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0001/actual.js
@@ -0,0 +1 @@
+var x, y;
diff --git a/test/fixtures/esprima/statement-variable/migrated_0001/expected.json b/test/fixtures/esprima/statement-variable/migrated_0001/expected.json
new file mode 100644
index 0000000000..4ed5077fe0
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0001/expected.json
@@ -0,0 +1,115 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "init": null
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "y"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-variable/migrated_0002/actual.js b/test/fixtures/esprima/statement-variable/migrated_0002/actual.js
new file mode 100644
index 0000000000..9a3e04e016
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0002/actual.js
@@ -0,0 +1 @@
+var x = 42
diff --git a/test/fixtures/esprima/statement-variable/migrated_0002/expected.json b/test/fixtures/esprima/statement-variable/migrated_0002/expected.json
new file mode 100644
index 0000000000..1050401744
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0002/expected.json
@@ -0,0 +1,103 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-variable/migrated_0003/actual.js b/test/fixtures/esprima/statement-variable/migrated_0003/actual.js
new file mode 100644
index 0000000000..52b77fe20a
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0003/actual.js
@@ -0,0 +1 @@
+var eval = 42, arguments = 42
diff --git a/test/fixtures/esprima/statement-variable/migrated_0003/expected.json b/test/fixtures/esprima/statement-variable/migrated_0003/expected.json
new file mode 100644
index 0000000000..a1ed3e4b37
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0003/expected.json
@@ -0,0 +1,154 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "eval"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 11,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 15,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "arguments"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-variable/migrated_0004/actual.js b/test/fixtures/esprima/statement-variable/migrated_0004/actual.js
new file mode 100644
index 0000000000..ac20052692
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0004/actual.js
@@ -0,0 +1 @@
+var x = 14, y = 3, z = 1977
diff --git a/test/fixtures/esprima/statement-variable/migrated_0004/expected.json b/test/fixtures/esprima/statement-variable/migrated_0004/expected.json
new file mode 100644
index 0000000000..db6e0fba4c
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0004/expected.json
@@ -0,0 +1,205 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "x"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 8,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "extra": {
+ "rawValue": 14,
+ "raw": "14"
+ },
+ "value": 14
+ }
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 12,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "y"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
+ }
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 19,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "z"
+ },
+ "init": {
+ "type": "NumberLiteral",
+ "start": 23,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "extra": {
+ "rawValue": 1977,
+ "raw": "1977"
+ },
+ "value": 1977
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-variable/migrated_0005/actual.js b/test/fixtures/esprima/statement-variable/migrated_0005/actual.js
new file mode 100644
index 0000000000..db88914197
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0005/actual.js
@@ -0,0 +1 @@
+var implements, interface, package
diff --git a/test/fixtures/esprima/statement-variable/migrated_0005/expected.json b/test/fixtures/esprima/statement-variable/migrated_0005/expected.json
new file mode 100644
index 0000000000..17a5559327
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0005/expected.json
@@ -0,0 +1,147 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "implements"
+ },
+ "init": null
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 16,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "interface"
+ },
+ "init": null
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 27,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "name": "package"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-variable/migrated_0006/actual.js b/test/fixtures/esprima/statement-variable/migrated_0006/actual.js
new file mode 100644
index 0000000000..5d2ca7181e
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0006/actual.js
@@ -0,0 +1 @@
+var private, protected, public, static
diff --git a/test/fixtures/esprima/statement-variable/migrated_0006/expected.json b/test/fixtures/esprima/statement-variable/migrated_0006/expected.json
new file mode 100644
index 0000000000..8744560249
--- /dev/null
+++ b/test/fixtures/esprima/statement-variable/migrated_0006/expected.json
@@ -0,0 +1,179 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "private"
+ },
+ "init": null
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "protected"
+ },
+ "init": null
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 24,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "name": "public"
+ },
+ "init": null
+ },
+ {
+ "type": "VariableDeclarator",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "name": "static"
+ },
+ "init": null
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-with/migrated_0000/actual.js b/test/fixtures/esprima/statement-with/migrated_0000/actual.js
new file mode 100644
index 0000000000..b3f4ca4b0d
--- /dev/null
+++ b/test/fixtures/esprima/statement-with/migrated_0000/actual.js
@@ -0,0 +1 @@
+with (x) foo = bar
diff --git a/test/fixtures/esprima/statement-with/migrated_0000/expected.json b/test/fixtures/esprima/statement-with/migrated_0000/expected.json
new file mode 100644
index 0000000000..f4e3da9d15
--- /dev/null
+++ b/test/fixtures/esprima/statement-with/migrated_0000/expected.json
@@ -0,0 +1,127 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WithStatement",
+ "start": 0,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "foo"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "bar"
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-with/migrated_0001/actual.js b/test/fixtures/esprima/statement-with/migrated_0001/actual.js
new file mode 100644
index 0000000000..66310a50db
--- /dev/null
+++ b/test/fixtures/esprima/statement-with/migrated_0001/actual.js
@@ -0,0 +1 @@
+with (x) foo = bar;
diff --git a/test/fixtures/esprima/statement-with/migrated_0001/expected.json b/test/fixtures/esprima/statement-with/migrated_0001/expected.json
new file mode 100644
index 0000000000..9e895a7f45
--- /dev/null
+++ b/test/fixtures/esprima/statement-with/migrated_0001/expected.json
@@ -0,0 +1,127 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WithStatement",
+ "start": 0,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "body": {
+ "type": "ExpressionStatement",
+ "start": 9,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 9,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "foo"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "bar"
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/esprima/statement-with/migrated_0002/actual.js b/test/fixtures/esprima/statement-with/migrated_0002/actual.js
new file mode 100644
index 0000000000..9a8f202108
--- /dev/null
+++ b/test/fixtures/esprima/statement-with/migrated_0002/actual.js
@@ -0,0 +1 @@
+with (x) { foo = bar }
diff --git a/test/fixtures/esprima/statement-with/migrated_0002/expected.json b/test/fixtures/esprima/statement-with/migrated_0002/expected.json
new file mode 100644
index 0000000000..d9e30cca90
--- /dev/null
+++ b/test/fixtures/esprima/statement-with/migrated_0002/expected.json
@@ -0,0 +1,144 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "WithStatement",
+ "start": 0,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "object": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "x"
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 9,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 11,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 11,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "foo"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "bar"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/experimental/async-functions/illegal-parens/actual.js b/test/fixtures/experimental/async-functions/illegal-parens/actual.js
new file mode 100644
index 0000000000..facf8ca53c
--- /dev/null
+++ b/test/fixtures/experimental/async-functions/illegal-parens/actual.js
@@ -0,0 +1 @@
+var foo = async ((foo)) => {};
diff --git a/test/fixtures/experimental/async-functions/illegal-parens/options.json b/test/fixtures/experimental/async-functions/illegal-parens/options.json
new file mode 100644
index 0000000000..fa579aa831
--- /dev/null
+++ b/test/fixtures/experimental/async-functions/illegal-parens/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:24)"
+}
diff --git a/test/fixtures/experimental/async-functions/object-last-property-shorthand/expected.json b/test/fixtures/experimental/async-functions/object-last-property-shorthand/expected.json
index b43eede7d6..bd3c1e7695 100644
--- a/test/fixtures/experimental/async-functions/object-last-property-shorthand/expected.json
+++ b/test/fixtures/experimental/async-functions/object-last-property-shorthand/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 11,
"loc": {
@@ -120,7 +120,6 @@
},
"name": "async"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 6,
@@ -143,6 +142,7 @@
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/async-functions/options.json b/test/fixtures/experimental/async-functions/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/async-functions/options.json
+++ b/test/fixtures/experimental/async-functions/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/async-functions/pattern/expected.json b/test/fixtures/experimental/async-functions/pattern/expected.json
index 6a7dde062f..339a3925ef 100644
--- a/test/fixtures/experimental/async-functions/pattern/expected.json
+++ b/test/fixtures/experimental/async-functions/pattern/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 7,
"end": 12,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "async"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 7,
@@ -157,7 +156,7 @@
},
"arguments": [
{
- "type": "Literal",
+ "type": "StringLiteral",
"start": 24,
"end": 38,
"loc": {
@@ -170,9 +169,11 @@
"column": 38
}
},
- "value": "../lang/task",
- "rawValue": "../lang/task",
- "raw": "'../lang/task'"
+ "extra": {
+ "rawValue": "../lang/task",
+ "raw": "'../lang/task'"
+ },
+ "value": "../lang/task"
}
]
}
@@ -180,6 +181,7 @@
],
"kind": "const"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/class-constructor-call/.duplicate/actual.js b/test/fixtures/experimental/class-constructor-call/.duplicate/actual.js
new file mode 100644
index 0000000000..6fd5dd7d11
--- /dev/null
+++ b/test/fixtures/experimental/class-constructor-call/.duplicate/actual.js
@@ -0,0 +1,4 @@
+class Foo {
+ call constructor() {}
+ call constructor() {}
+}
diff --git a/test/fixtures/experimental/class-constructor-call/illegal-generator/actual.js b/test/fixtures/experimental/class-constructor-call/illegal-generator/actual.js
new file mode 100644
index 0000000000..9a3bd5d8d6
--- /dev/null
+++ b/test/fixtures/experimental/class-constructor-call/illegal-generator/actual.js
@@ -0,0 +1,5 @@
+class Foo {
+ *call constructor() {
+ foo();
+ }
+}
diff --git a/test/fixtures/experimental/class-constructor-call/illegal-generator/options.json b/test/fixtures/experimental/class-constructor-call/illegal-generator/options.json
new file mode 100644
index 0000000000..ef2b7c682f
--- /dev/null
+++ b/test/fixtures/experimental/class-constructor-call/illegal-generator/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:8)"
+}
diff --git a/test/fixtures/experimental/class-constructor-call/illegal-key/actual.js b/test/fixtures/experimental/class-constructor-call/illegal-key/actual.js
new file mode 100644
index 0000000000..e3155a24a8
--- /dev/null
+++ b/test/fixtures/experimental/class-constructor-call/illegal-key/actual.js
@@ -0,0 +1,5 @@
+class Foo {
+ call foobar() {
+ foo();
+ }
+}
diff --git a/test/fixtures/experimental/class-constructor-call/illegal-key/options.json b/test/fixtures/experimental/class-constructor-call/illegal-key/options.json
new file mode 100644
index 0000000000..4e84114247
--- /dev/null
+++ b/test/fixtures/experimental/class-constructor-call/illegal-key/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (2:7)"
+}
diff --git a/test/fixtures/experimental/class-constructor-call/options.json b/test/fixtures/experimental/class-constructor-call/options.json
new file mode 100644
index 0000000000..253cf5199b
--- /dev/null
+++ b/test/fixtures/experimental/class-constructor-call/options.json
@@ -0,0 +1,3 @@
+{
+ "plugins": ["classConstructorCall"]
+}
diff --git a/test/fixtures/experimental/class-constructor-call/plain/actual.js b/test/fixtures/experimental/class-constructor-call/plain/actual.js
new file mode 100644
index 0000000000..1f8b64ef4a
--- /dev/null
+++ b/test/fixtures/experimental/class-constructor-call/plain/actual.js
@@ -0,0 +1,5 @@
+class Foo {
+ call constructor() {
+ foo();
+ }
+}
diff --git a/test/fixtures/experimental/class-constructor-call/plain/expected.json b/test/fixtures/experimental/class-constructor-call/plain/expected.json
new file mode 100644
index 0000000000..49c89dadbc
--- /dev/null
+++ b/test/fixtures/experimental/class-constructor-call/plain/expected.json
@@ -0,0 +1,186 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ClassDeclaration",
+ "start": 0,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 6,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "Foo"
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 10,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ },
+ "body": [
+ {
+ "type": "ClassMethod",
+ "start": 14,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 4,
+ "column": 3
+ }
+ },
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "name": "constructor"
+ },
+ "static": false,
+ "kind": "constructorCall",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 33,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 4,
+ "column": 3
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 39,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 39,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "callee": {
+ "type": "Identifier",
+ "start": 39,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "arguments": []
+ }
+ }
+ ],
+ "directives": []
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/24/actual.js b/test/fixtures/experimental/uncategorised/.24/actual.js
similarity index 100%
rename from test/fixtures/experimental/uncategorised/24/actual.js
rename to test/fixtures/experimental/uncategorised/.24/actual.js
diff --git a/test/fixtures/experimental/uncategorised/24/expected.json b/test/fixtures/experimental/uncategorised/.24/expected.json
similarity index 100%
rename from test/fixtures/experimental/uncategorised/24/expected.json
rename to test/fixtures/experimental/uncategorised/.24/expected.json
diff --git a/test/fixtures/experimental/uncategorised/.24/options.json b/test/fixtures/experimental/uncategorised/.24/options.json
new file mode 100644
index 0000000000..7bbe8c30f5
--- /dev/null
+++ b/test/fixtures/experimental/uncategorised/.24/options.json
@@ -0,0 +1,3 @@
+{
+ "plugins": ["asyncFunctions"]
+}
diff --git a/test/fixtures/experimental/uncategorised/10/expected.json b/test/fixtures/experimental/uncategorised/10/expected.json
index 306cf66aef..f017a9cc8e 100644
--- a/test/fixtures/experimental/uncategorised/10/expected.json
+++ b/test/fixtures/experimental/uncategorised/10/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 6,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 5,
@@ -124,7 +123,7 @@
}
},
{
- "type": "SpreadProperty",
+ "type": "RestProperty",
"start": 8,
"end": 12,
"loc": {
@@ -176,6 +175,7 @@
],
"kind": "let"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/10/options.json b/test/fixtures/experimental/uncategorised/10/options.json
index 0d83328100..4de042a697 100644
--- a/test/fixtures/experimental/uncategorised/10/options.json
+++ b/test/fixtures/experimental/uncategorised/10/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.objectRestSpread": true
- }
-}
\ No newline at end of file
+ "plugins": ["objectRestSpread"]
+}
diff --git a/test/fixtures/experimental/uncategorised/11/expected.json b/test/fixtures/experimental/uncategorised/11/expected.json
index 4507ca2447..64c2046836 100644
--- a/test/fixtures/experimental/uncategorised/11/expected.json
+++ b/test/fixtures/experimental/uncategorised/11/expected.json
@@ -76,7 +76,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 11,
"end": 12,
"loc": {
@@ -108,7 +108,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 11,
@@ -127,7 +126,7 @@
}
},
{
- "type": "SpreadProperty",
+ "type": "RestProperty",
"start": 14,
"end": 18,
"loc": {
@@ -174,11 +173,15 @@
"column": 24
}
},
- "body": []
+ "body": [],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/11/options.json b/test/fixtures/experimental/uncategorised/11/options.json
index 0d83328100..4de042a697 100644
--- a/test/fixtures/experimental/uncategorised/11/options.json
+++ b/test/fixtures/experimental/uncategorised/11/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.objectRestSpread": true
- }
-}
\ No newline at end of file
+ "plugins": ["objectRestSpread"]
+}
diff --git a/test/fixtures/experimental/uncategorised/12/options.json b/test/fixtures/experimental/uncategorised/12/options.json
index 0d83328100..4de042a697 100644
--- a/test/fixtures/experimental/uncategorised/12/options.json
+++ b/test/fixtures/experimental/uncategorised/12/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.objectRestSpread": true
- }
-}
\ No newline at end of file
+ "plugins": ["objectRestSpread"]
+}
diff --git a/test/fixtures/experimental/uncategorised/13/expected.json b/test/fixtures/experimental/uncategorised/13/expected.json
index bbf2490867..13c6c8dc0c 100644
--- a/test/fixtures/experimental/uncategorised/13/expected.json
+++ b/test/fixtures/experimental/uncategorised/13/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 6,
"loc": {
@@ -121,7 +121,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 5,
@@ -174,6 +173,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/13/options.json b/test/fixtures/experimental/uncategorised/13/options.json
index 0d83328100..4de042a697 100644
--- a/test/fixtures/experimental/uncategorised/13/options.json
+++ b/test/fixtures/experimental/uncategorised/13/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.objectRestSpread": true
- }
-}
\ No newline at end of file
+ "plugins": ["objectRestSpread"]
+}
diff --git a/test/fixtures/experimental/uncategorised/14/expected.json b/test/fixtures/experimental/uncategorised/14/expected.json
index 1002fb1e60..761b028be8 100644
--- a/test/fixtures/experimental/uncategorised/14/expected.json
+++ b/test/fixtures/experimental/uncategorised/14/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 2,
"end": 3,
"loc": {
@@ -90,7 +90,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 2,
@@ -140,7 +139,7 @@
}
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 11,
"end": 12,
"loc": {
@@ -172,7 +171,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 11,
@@ -222,7 +220,7 @@
}
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 20,
"end": 21,
"loc": {
@@ -254,7 +252,6 @@
},
"name": "c"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 20,
@@ -273,9 +270,12 @@
}
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/14/options.json b/test/fixtures/experimental/uncategorised/14/options.json
index 0d83328100..4de042a697 100644
--- a/test/fixtures/experimental/uncategorised/14/options.json
+++ b/test/fixtures/experimental/uncategorised/14/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.objectRestSpread": true
- }
-}
\ No newline at end of file
+ "plugins": ["objectRestSpread"]
+}
diff --git a/test/fixtures/experimental/uncategorised/15/options.json b/test/fixtures/experimental/uncategorised/15/options.json
index 8dcea40e59..080411a1bd 100644
--- a/test/fixtures/experimental/uncategorised/15/options.json
+++ b/test/fixtures/experimental/uncategorised/15/options.json
@@ -1,6 +1,4 @@
{
- "features": {
- "es7.asyncFunctions": true
- },
+ "plugins": ["asyncFunctions"],
"throws": "Unexpected token (1:30)"
-}
\ No newline at end of file
+}
diff --git a/test/fixtures/experimental/uncategorised/16/options.json b/test/fixtures/experimental/uncategorised/16/options.json
index 01116f62ed..ebda253376 100644
--- a/test/fixtures/experimental/uncategorised/16/options.json
+++ b/test/fixtures/experimental/uncategorised/16/options.json
@@ -1,6 +1,4 @@
{
- "features": {
- "es7.asyncFunctions": true
- },
+ "plugins": ["asyncFunctions"],
"throws": "Unexpected token (2:4)"
-}
\ No newline at end of file
+}
diff --git a/test/fixtures/experimental/uncategorised/17/expected.json b/test/fixtures/experimental/uncategorised/17/expected.json
index 4a9da1d79e..519910a604 100644
--- a/test/fixtures/experimental/uncategorised/17/expected.json
+++ b/test/fixtures/experimental/uncategorised/17/expected.json
@@ -91,7 +91,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [],
"body": {
"type": "BlockStatement",
@@ -107,9 +106,11 @@
"column": 17
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/17/options.json b/test/fixtures/experimental/uncategorised/17/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/17/options.json
+++ b/test/fixtures/experimental/uncategorised/17/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/18/options.json b/test/fixtures/experimental/uncategorised/18/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/18/options.json
+++ b/test/fixtures/experimental/uncategorised/18/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/19/expected.json b/test/fixtures/experimental/uncategorised/19/expected.json
index 954665acdb..eb899c91ea 100644
--- a/test/fixtures/experimental/uncategorised/19/expected.json
+++ b/test/fixtures/experimental/uncategorised/19/expected.json
@@ -189,14 +189,19 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/19/options.json b/test/fixtures/experimental/uncategorised/19/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/19/options.json
+++ b/test/fixtures/experimental/uncategorised/19/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/20/options.json b/test/fixtures/experimental/uncategorised/20/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/20/options.json
+++ b/test/fixtures/experimental/uncategorised/20/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/21/expected.json b/test/fixtures/experimental/uncategorised/21/expected.json
index 21fcf81f56..05a0c068cb 100644
--- a/test/fixtures/experimental/uncategorised/21/expected.json
+++ b/test/fixtures/experimental/uncategorised/21/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 10,
"end": 14,
"loc": {
@@ -122,7 +122,7 @@
"name": "a"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 13,
"end": 14,
"loc": {
@@ -135,14 +135,15 @@
"column": 14
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
},
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 16,
"end": 52,
"loc": {
@@ -174,60 +175,60 @@
},
"name": "foo"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 25,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 26,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "promise"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 35,
"end": 52,
"loc": {
"start": {
"line": 1,
- "column": 25
+ "column": 35
},
"end": {
"line": 1,
"column": 52
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": true,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 26,
- "end": 33,
+ "type": "ExpressionStatement",
+ "start": 37,
+ "end": 50,
"loc": {
"start": {
"line": 1,
- "column": 26
+ "column": 37
},
"end": {
"line": 1,
- "column": 33
+ "column": 50
}
},
- "name": "promise"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 35,
- "end": 52,
- "loc": {
- "start": {
- "line": 1,
- "column": 35
- },
- "end": {
- "line": 1,
- "column": 52
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "AwaitExpression",
"start": 37,
"end": 50,
"loc": {
@@ -240,41 +241,27 @@
"column": 50
}
},
- "expression": {
- "type": "AwaitExpression",
- "start": 37,
+ "all": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 43,
"end": 50,
"loc": {
"start": {
"line": 1,
- "column": 37
+ "column": 43
},
"end": {
"line": 1,
"column": 50
}
},
- "all": false,
- "argument": {
- "type": "Identifier",
- "start": 43,
- "end": 50,
- "loc": {
- "start": {
- "line": 1,
- "column": 43
- },
- "end": {
- "line": 1,
- "column": 50
- }
- },
- "name": "promise"
- }
+ "name": "promise"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
@@ -283,6 +270,7 @@
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/21/options.json b/test/fixtures/experimental/uncategorised/21/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/21/options.json
+++ b/test/fixtures/experimental/uncategorised/21/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/22/expected.json b/test/fixtures/experimental/uncategorised/22/expected.json
index 3f2e2fe5b0..a0fd07d512 100644
--- a/test/fixtures/experimental/uncategorised/22/expected.json
+++ b/test/fixtures/experimental/uncategorised/22/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 12,
"end": 48,
"loc": {
@@ -107,59 +107,59 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 21,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 22,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "promise"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 31,
"end": 48,
"loc": {
"start": {
"line": 1,
- "column": 21
+ "column": 31
},
"end": {
"line": 1,
"column": 48
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": true,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 22,
- "end": 29,
+ "type": "ExpressionStatement",
+ "start": 33,
+ "end": 46,
"loc": {
"start": {
"line": 1,
- "column": 22
+ "column": 33
},
"end": {
"line": 1,
- "column": 29
+ "column": 46
}
},
- "name": "promise"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 31,
- "end": 48,
- "loc": {
- "start": {
- "line": 1,
- "column": 31
- },
- "end": {
- "line": 1,
- "column": 48
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "AwaitExpression",
"start": 33,
"end": 46,
"loc": {
@@ -172,46 +172,33 @@
"column": 46
}
},
- "expression": {
- "type": "AwaitExpression",
- "start": 33,
+ "all": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 39,
"end": 46,
"loc": {
"start": {
"line": 1,
- "column": 33
+ "column": 39
},
"end": {
"line": 1,
"column": 46
}
},
- "all": false,
- "argument": {
- "type": "Identifier",
- "start": 39,
- "end": 46,
- "loc": {
- "start": {
- "line": 1,
- "column": 39
- },
- "end": {
- "line": 1,
- "column": 46
- }
- },
- "name": "promise"
- }
+ "name": "promise"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/22/options.json b/test/fixtures/experimental/uncategorised/22/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/22/options.json
+++ b/test/fixtures/experimental/uncategorised/22/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/23/options.json b/test/fixtures/experimental/uncategorised/23/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/23/options.json
+++ b/test/fixtures/experimental/uncategorised/23/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/24/options.json b/test/fixtures/experimental/uncategorised/24/options.json
deleted file mode 100644
index 2fce804177..0000000000
--- a/test/fixtures/experimental/uncategorised/24/options.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "features": {
- "es7.asyncFunctions": true
- }
-}
diff --git a/test/fixtures/experimental/uncategorised/25/options.json b/test/fixtures/experimental/uncategorised/25/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/25/options.json
+++ b/test/fixtures/experimental/uncategorised/25/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/26/expected.json b/test/fixtures/experimental/uncategorised/26/expected.json
index 04b1d89257..c39596f9e3 100644
--- a/test/fixtures/experimental/uncategorised/26/expected.json
+++ b/test/fixtures/experimental/uncategorised/26/expected.json
@@ -121,7 +121,7 @@
},
"arguments": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 11,
"end": 12,
"loc": {
@@ -134,12 +134,14 @@
"column": 12
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 14,
"end": 15,
"loc": {
@@ -152,9 +154,11 @@
"column": 15
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
]
},
@@ -177,7 +181,7 @@
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/26/options.json b/test/fixtures/experimental/uncategorised/26/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/26/options.json
+++ b/test/fixtures/experimental/uncategorised/26/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/27/options.json b/test/fixtures/experimental/uncategorised/27/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/27/options.json
+++ b/test/fixtures/experimental/uncategorised/27/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/28/expected.json b/test/fixtures/experimental/uncategorised/28/expected.json
index 2ac6e0d7d9..19adb39a8e 100644
--- a/test/fixtures/experimental/uncategorised/28/expected.json
+++ b/test/fixtures/experimental/uncategorised/28/expected.json
@@ -59,7 +59,6 @@
"id": null,
"generator": false,
"expression": false,
- "async": false,
"params": [],
"body": {
"type": "BlockStatement",
@@ -172,7 +171,7 @@
"name": "async"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 33,
"end": 35,
"loc": {
@@ -185,18 +184,23 @@
"column": 35
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/28/options.json b/test/fixtures/experimental/uncategorised/28/options.json
index 2fce804177..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/28/options.json
+++ b/test/fixtures/experimental/uncategorised/28/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
+ "plugins": ["asyncFunctions"]
}
diff --git a/test/fixtures/experimental/uncategorised/29/expected.json b/test/fixtures/experimental/uncategorised/29/expected.json
index 8b5de05d88..0c05743d58 100644
--- a/test/fixtures/experimental/uncategorised/29/expected.json
+++ b/test/fixtures/experimental/uncategorised/29/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 13,
"end": 23,
"loc": {
@@ -107,46 +107,33 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 18,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
"end": 23,
"loc": {
"start": {
"line": 1,
- "column": 18
+ "column": 21
},
"end": {
"line": 1,
"column": 23
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 21,
- "end": 23,
- "loc": {
- "start": {
- "line": 1,
- "column": 21
- },
- "end": {
- "line": 1,
- "column": 23
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/29/options.json b/test/fixtures/experimental/uncategorised/29/options.json
index 50edc4238b..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/29/options.json
+++ b/test/fixtures/experimental/uncategorised/29/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
-}
\ No newline at end of file
+ "plugins": ["asyncFunctions"]
+}
diff --git a/test/fixtures/experimental/uncategorised/3/expected.json b/test/fixtures/experimental/uncategorised/3/expected.json
index b3b034a0f3..d6362bdbed 100644
--- a/test/fixtures/experimental/uncategorised/3/expected.json
+++ b/test/fixtures/experimental/uncategorised/3/expected.json
@@ -74,7 +74,7 @@
"name": "a"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 7,
"loc": {
@@ -87,12 +87,15 @@
"column": 7
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/3/options.json b/test/fixtures/experimental/uncategorised/3/options.json
index 875943b10b..d01676b6ba 100644
--- a/test/fixtures/experimental/uncategorised/3/options.json
+++ b/test/fixtures/experimental/uncategorised/3/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.exponentiationOperator": true
- }
-}
\ No newline at end of file
+ "plugins": ["exponentiationOperator"]
+}
diff --git a/test/fixtures/experimental/uncategorised/30/expected.json b/test/fixtures/experimental/uncategorised/30/expected.json
index b632f91acc..a5e072a934 100644
--- a/test/fixtures/experimental/uncategorised/30/expected.json
+++ b/test/fixtures/experimental/uncategorised/30/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 12,
"end": 25,
"loc": {
@@ -121,7 +121,7 @@
"name": "async"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 19,
"end": 25,
"loc": {
@@ -134,11 +134,12 @@
"column": 25
}
},
- "value": "test",
- "rawValue": "test",
- "raw": "\"test\""
- },
- "kind": "init"
+ "extra": {
+ "rawValue": "test",
+ "raw": "\"test\""
+ },
+ "value": "test"
+ }
}
]
}
@@ -146,6 +147,7 @@
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/30/options.json b/test/fixtures/experimental/uncategorised/30/options.json
index 50edc4238b..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/30/options.json
+++ b/test/fixtures/experimental/uncategorised/30/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
-}
\ No newline at end of file
+ "plugins": ["asyncFunctions"]
+}
diff --git a/test/fixtures/experimental/uncategorised/31/expected.json b/test/fixtures/experimental/uncategorised/31/expected.json
index a05229ee4e..1078686a77 100644
--- a/test/fixtures/experimental/uncategorised/31/expected.json
+++ b/test/fixtures/experimental/uncategorised/31/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 12,
"end": 22,
"loc": {
@@ -120,42 +120,28 @@
},
"name": "async"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 17,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
"end": 22,
"loc": {
"start": {
"line": 1,
- "column": 17
+ "column": 20
},
"end": {
"line": 1,
"column": 22
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 20,
- "end": 22,
- "loc": {
- "start": {
- "line": 1,
- "column": 20
- },
- "end": {
- "line": 1,
- "column": 22
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
@@ -164,6 +150,7 @@
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/31/options.json b/test/fixtures/experimental/uncategorised/31/options.json
index 50edc4238b..7bbe8c30f5 100644
--- a/test/fixtures/experimental/uncategorised/31/options.json
+++ b/test/fixtures/experimental/uncategorised/31/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.asyncFunctions": true
- }
-}
\ No newline at end of file
+ "plugins": ["asyncFunctions"]
+}
diff --git a/test/fixtures/experimental/uncategorised/32/options.json b/test/fixtures/experimental/uncategorised/32/options.json
index 3926a9650c..87a4cd6baf 100644
--- a/test/fixtures/experimental/uncategorised/32/options.json
+++ b/test/fixtures/experimental/uncategorised/32/options.json
@@ -1,6 +1,4 @@
{
"sourceType": "module",
- "features": {
- "es7.asyncFunctions": true
- }
-}
\ No newline at end of file
+ "plugins": ["asyncFunctions"]
+}
diff --git a/test/fixtures/experimental/uncategorised/33/options.json b/test/fixtures/experimental/uncategorised/33/options.json
index 27f5622b68..d760b0afda 100644
--- a/test/fixtures/experimental/uncategorised/33/options.json
+++ b/test/fixtures/experimental/uncategorised/33/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": ["decorators"]
+}
diff --git a/test/fixtures/experimental/uncategorised/34/options.json b/test/fixtures/experimental/uncategorised/34/options.json
index 27f5622b68..d760b0afda 100644
--- a/test/fixtures/experimental/uncategorised/34/options.json
+++ b/test/fixtures/experimental/uncategorised/34/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": ["decorators"]
+}
diff --git a/test/fixtures/experimental/uncategorised/35/expected.json b/test/fixtures/experimental/uncategorised/35/expected.json
index 03c8437135..ff000260aa 100644
--- a/test/fixtures/experimental/uncategorised/35/expected.json
+++ b/test/fixtures/experimental/uncategorised/35/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 17,
"end": 25,
"loc": {
@@ -140,45 +140,32 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 20,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
"end": 25,
"loc": {
"start": {
"line": 1,
- "column": 20
+ "column": 23
},
"end": {
"line": 1,
"column": 25
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 23,
- "end": 25,
- "loc": {
- "start": {
- "line": 1,
- "column": 23
- },
- "end": {
- "line": 1,
- "column": 25
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/35/options.json b/test/fixtures/experimental/uncategorised/35/options.json
index 27f5622b68..d760b0afda 100644
--- a/test/fixtures/experimental/uncategorised/35/options.json
+++ b/test/fixtures/experimental/uncategorised/35/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": ["decorators"]
+}
diff --git a/test/fixtures/experimental/uncategorised/36/expected.json b/test/fixtures/experimental/uncategorised/36/expected.json
index 50d2011f36..118d2b69c5 100644
--- a/test/fixtures/experimental/uncategorised/36/expected.json
+++ b/test/fixtures/experimental/uncategorised/36/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 17,
"end": 30,
"loc": {
@@ -140,62 +140,49 @@
},
"static": false,
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 24,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "name": "f"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 28,
"end": 30,
"loc": {
"start": {
"line": 1,
- "column": 24
+ "column": 28
},
"end": {
"line": 1,
"column": 30
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 25,
- "end": 26,
- "loc": {
- "start": {
- "line": 1,
- "column": 25
- },
- "end": {
- "line": 1,
- "column": 26
- }
- },
- "name": "f"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 28,
- "end": 30,
- "loc": {
- "start": {
- "line": 1,
- "column": 28
- },
- "end": {
- "line": 1,
- "column": 30
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/36/options.json b/test/fixtures/experimental/uncategorised/36/options.json
index 27f5622b68..d760b0afda 100644
--- a/test/fixtures/experimental/uncategorised/36/options.json
+++ b/test/fixtures/experimental/uncategorised/36/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": ["decorators"]
+}
diff --git a/test/fixtures/experimental/uncategorised/37/expected.json b/test/fixtures/experimental/uncategorised/37/expected.json
index ac0fa38fc3..ad67c94592 100644
--- a/test/fixtures/experimental/uncategorised/37/expected.json
+++ b/test/fixtures/experimental/uncategorised/37/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 17,
"end": 29,
"loc": {
@@ -140,45 +140,32 @@
},
"static": false,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 24,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
"end": 29,
"loc": {
"start": {
"line": 1,
- "column": 24
+ "column": 27
},
"end": {
"line": 1,
"column": 29
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 27,
- "end": 29,
- "loc": {
- "start": {
- "line": 1,
- "column": 27
- },
- "end": {
- "line": 1,
- "column": 29
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/37/options.json b/test/fixtures/experimental/uncategorised/37/options.json
index 27f5622b68..d760b0afda 100644
--- a/test/fixtures/experimental/uncategorised/37/options.json
+++ b/test/fixtures/experimental/uncategorised/37/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": ["decorators"]
+}
diff --git a/test/fixtures/experimental/uncategorised/38/expected.json b/test/fixtures/experimental/uncategorised/38/expected.json
index c538000216..d55670aa51 100644
--- a/test/fixtures/experimental/uncategorised/38/expected.json
+++ b/test/fixtures/experimental/uncategorised/38/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 22,
"end": 30,
"loc": {
@@ -171,45 +171,32 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 25,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 28,
"end": 30,
"loc": {
"start": {
"line": 1,
- "column": 25
+ "column": 28
},
"end": {
"line": 1,
"column": 30
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 28,
- "end": 30,
- "loc": {
- "start": {
- "line": 1,
- "column": 28
- },
- "end": {
- "line": 1,
- "column": 30
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/38/options.json b/test/fixtures/experimental/uncategorised/38/options.json
index 27f5622b68..d760b0afda 100644
--- a/test/fixtures/experimental/uncategorised/38/options.json
+++ b/test/fixtures/experimental/uncategorised/38/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": ["decorators"]
+}
diff --git a/test/fixtures/experimental/uncategorised/39/expected.json b/test/fixtures/experimental/uncategorised/39/expected.json
index ae7ad96b18..b8e2fae3e8 100644
--- a/test/fixtures/experimental/uncategorised/39/expected.json
+++ b/test/fixtures/experimental/uncategorised/39/expected.json
@@ -104,7 +104,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 12,
"end": 22,
"loc": {
@@ -170,7 +170,7 @@
"name": "foo"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 17,
"end": 22,
"loc": {
@@ -183,11 +183,12 @@
"column": 22
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
- },
- "kind": "init"
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
+ }
}
]
}
@@ -260,6 +261,7 @@
"body": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/39/options.json b/test/fixtures/experimental/uncategorised/39/options.json
index 27f5622b68..d760b0afda 100644
--- a/test/fixtures/experimental/uncategorised/39/options.json
+++ b/test/fixtures/experimental/uncategorised/39/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": ["decorators"]
+}
diff --git a/test/fixtures/experimental/uncategorised/4/expected.json b/test/fixtures/experimental/uncategorised/4/expected.json
index b80d1e3d1d..43b7675cb2 100644
--- a/test/fixtures/experimental/uncategorised/4/expected.json
+++ b/test/fixtures/experimental/uncategorised/4/expected.json
@@ -88,7 +88,7 @@
}
},
"left": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 14,
"end": 15,
"loc": {
@@ -101,13 +101,15 @@
"column": 15
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
},
"operator": "**",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 19,
"end": 20,
"loc": {
@@ -120,15 +122,18 @@
"column": 20
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/4/options.json b/test/fixtures/experimental/uncategorised/4/options.json
index 875943b10b..d01676b6ba 100644
--- a/test/fixtures/experimental/uncategorised/4/options.json
+++ b/test/fixtures/experimental/uncategorised/4/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.exponentiationOperator": true
- }
-}
\ No newline at end of file
+ "plugins": ["exponentiationOperator"]
+}
diff --git a/test/fixtures/experimental/uncategorised/40/options.json b/test/fixtures/experimental/uncategorised/40/options.json
index 27f5622b68..d760b0afda 100644
--- a/test/fixtures/experimental/uncategorised/40/options.json
+++ b/test/fixtures/experimental/uncategorised/40/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": ["decorators"]
+}
diff --git a/test/fixtures/experimental/uncategorised/41/options.json b/test/fixtures/experimental/uncategorised/41/options.json
index 182e2604d5..935ac72894 100644
--- a/test/fixtures/experimental/uncategorised/41/options.json
+++ b/test/fixtures/experimental/uncategorised/41/options.json
@@ -1,6 +1,4 @@
{
- "features": {
- "es7.decorators": true
- },
+ "plugins": ["decorators"],
"throws": "Leading decorators must be attached to a class declaration (1:5)"
-}
\ No newline at end of file
+}
diff --git a/test/fixtures/experimental/uncategorised/42/options.json b/test/fixtures/experimental/uncategorised/42/options.json
index 9e67302514..ec1974dcf0 100644
--- a/test/fixtures/experimental/uncategorised/42/options.json
+++ b/test/fixtures/experimental/uncategorised/42/options.json
@@ -1,6 +1,4 @@
{
- "features": {
- "es7.decorators": true
- },
+ "plugins": ["decorators"],
"throws": "You have trailing decorators with no method (1:18)"
-}
\ No newline at end of file
+}
diff --git a/test/fixtures/experimental/uncategorised/43/expected.json b/test/fixtures/experimental/uncategorised/43/expected.json
index b60ecb31ce..f1956ad133 100644
--- a/test/fixtures/experimental/uncategorised/43/expected.json
+++ b/test/fixtures/experimental/uncategorised/43/expected.json
@@ -107,7 +107,7 @@
},
"static": false,
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 18,
"end": 23,
"loc": {
@@ -120,14 +120,17 @@
"column": 23
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/43/options.json b/test/fixtures/experimental/uncategorised/43/options.json
index fde5b42bd7..9c27576d4a 100644
--- a/test/fixtures/experimental/uncategorised/43/options.json
+++ b/test/fixtures/experimental/uncategorised/43/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.classProperties": true
- }
-}
\ No newline at end of file
+ "plugins": ["classProperties"]
+}
diff --git a/test/fixtures/experimental/uncategorised/44/options.json b/test/fixtures/experimental/uncategorised/44/options.json
index fde5b42bd7..9c27576d4a 100644
--- a/test/fixtures/experimental/uncategorised/44/options.json
+++ b/test/fixtures/experimental/uncategorised/44/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.classProperties": true
- }
-}
\ No newline at end of file
+ "plugins": ["classProperties"]
+}
diff --git a/test/fixtures/experimental/uncategorised/45/options.json b/test/fixtures/experimental/uncategorised/45/options.json
index fde5b42bd7..9c27576d4a 100644
--- a/test/fixtures/experimental/uncategorised/45/options.json
+++ b/test/fixtures/experimental/uncategorised/45/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.classProperties": true
- }
-}
\ No newline at end of file
+ "plugins": ["classProperties"]
+}
diff --git a/test/fixtures/experimental/uncategorised/46/expected.json b/test/fixtures/experimental/uncategorised/46/expected.json
index c04b1ed63a..ade2f517c1 100644
--- a/test/fixtures/experimental/uncategorised/46/expected.json
+++ b/test/fixtures/experimental/uncategorised/46/expected.json
@@ -107,7 +107,7 @@
},
"static": true,
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 25,
"end": 30,
"loc": {
@@ -120,14 +120,17 @@
"column": 30
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/46/options.json b/test/fixtures/experimental/uncategorised/46/options.json
index fde5b42bd7..9c27576d4a 100644
--- a/test/fixtures/experimental/uncategorised/46/options.json
+++ b/test/fixtures/experimental/uncategorised/46/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.classProperties": true
- }
-}
\ No newline at end of file
+ "plugins": ["classProperties"]
+}
diff --git a/test/fixtures/experimental/uncategorised/47/expected.json b/test/fixtures/experimental/uncategorised/47/expected.json
index bda9a3aa5f..e13785eb68 100644
--- a/test/fixtures/experimental/uncategorised/47/expected.json
+++ b/test/fixtures/experimental/uncategorised/47/expected.json
@@ -140,7 +140,7 @@
},
"static": false,
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 23,
"end": 28,
"loc": {
@@ -153,14 +153,17 @@
"column": 28
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/47/options.json b/test/fixtures/experimental/uncategorised/47/options.json
index 911667bcfa..4d015e4fbf 100644
--- a/test/fixtures/experimental/uncategorised/47/options.json
+++ b/test/fixtures/experimental/uncategorised/47/options.json
@@ -1,6 +1,6 @@
{
- "features": {
- "es7.classProperties": true,
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": [
+ "classProperties",
+ "decorators"
+ ]
+}
diff --git a/test/fixtures/experimental/uncategorised/48/expected.json b/test/fixtures/experimental/uncategorised/48/expected.json
index 4a67cce782..9f756cd6cb 100644
--- a/test/fixtures/experimental/uncategorised/48/expected.json
+++ b/test/fixtures/experimental/uncategorised/48/expected.json
@@ -140,7 +140,7 @@
},
"static": true,
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 30,
"end": 35,
"loc": {
@@ -153,14 +153,17 @@
"column": 35
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/48/options.json b/test/fixtures/experimental/uncategorised/48/options.json
index 911667bcfa..4d015e4fbf 100644
--- a/test/fixtures/experimental/uncategorised/48/options.json
+++ b/test/fixtures/experimental/uncategorised/48/options.json
@@ -1,6 +1,6 @@
{
- "features": {
- "es7.classProperties": true,
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": [
+ "classProperties",
+ "decorators"
+ ]
+}
diff --git a/test/fixtures/experimental/uncategorised/49/expected.json b/test/fixtures/experimental/uncategorised/49/expected.json
index dfcd786eed..1186fc6b42 100644
--- a/test/fixtures/experimental/uncategorised/49/expected.json
+++ b/test/fixtures/experimental/uncategorised/49/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 17,
"end": 27,
"loc": {
@@ -155,7 +155,7 @@
"name": "bar"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 22,
"end": 27,
"loc": {
@@ -168,11 +168,12 @@
"column": 27
}
},
- "value": "wow",
- "rawValue": "wow",
- "raw": "'wow'"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": "wow",
+ "raw": "'wow'"
+ },
+ "value": "wow"
+ }
}
]
}
@@ -180,6 +181,7 @@
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/49/options.json b/test/fixtures/experimental/uncategorised/49/options.json
index 27f5622b68..d760b0afda 100644
--- a/test/fixtures/experimental/uncategorised/49/options.json
+++ b/test/fixtures/experimental/uncategorised/49/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.decorators": true
- }
-}
\ No newline at end of file
+ "plugins": ["decorators"]
+}
diff --git a/test/fixtures/experimental/uncategorised/5/expected.json b/test/fixtures/experimental/uncategorised/5/expected.json
index 645aef02a4..a90eceb9de 100644
--- a/test/fixtures/experimental/uncategorised/5/expected.json
+++ b/test/fixtures/experimental/uncategorised/5/expected.json
@@ -57,7 +57,7 @@
}
},
"left": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 1,
"loc": {
@@ -70,9 +70,11 @@
"column": 1
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
},
"operator": "**",
"right": {
@@ -90,7 +92,7 @@
}
},
"left": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 7,
"loc": {
@@ -103,13 +105,15 @@
"column": 7
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
},
"operator": "**",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 11,
"end": 12,
"loc": {
@@ -122,14 +126,19 @@
"column": 12
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/5/options.json b/test/fixtures/experimental/uncategorised/5/options.json
index 875943b10b..d01676b6ba 100644
--- a/test/fixtures/experimental/uncategorised/5/options.json
+++ b/test/fixtures/experimental/uncategorised/5/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.exponentiationOperator": true
- }
-}
\ No newline at end of file
+ "plugins": ["exponentiationOperator"]
+}
diff --git a/test/fixtures/experimental/uncategorised/50/expected.json b/test/fixtures/experimental/uncategorised/50/expected.json
index 1ee24c7d22..c901163da6 100644
--- a/test/fixtures/experimental/uncategorised/50/expected.json
+++ b/test/fixtures/experimental/uncategorised/50/expected.json
@@ -123,7 +123,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 25,
"end": 30,
"loc": {
@@ -136,11 +136,14 @@
"column": 30
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/50/options.json b/test/fixtures/experimental/uncategorised/50/options.json
index dab8dec6a1..9ca434c7ad 100644
--- a/test/fixtures/experimental/uncategorised/50/options.json
+++ b/test/fixtures/experimental/uncategorised/50/options.json
@@ -1,6 +1,4 @@
{
"sourceType": "module",
- "features": {
- "es7.exportExtensions": true
- }
-}
\ No newline at end of file
+ "plugins": ["exportExtensions"]
+}
diff --git a/test/fixtures/experimental/uncategorised/51/expected.json b/test/fixtures/experimental/uncategorised/51/expected.json
index fce4a529c1..cf777d23e3 100644
--- a/test/fixtures/experimental/uncategorised/51/expected.json
+++ b/test/fixtures/experimental/uncategorised/51/expected.json
@@ -123,7 +123,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 30,
"end": 35,
"loc": {
@@ -136,11 +136,14 @@
"column": 35
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/51/options.json b/test/fixtures/experimental/uncategorised/51/options.json
index dab8dec6a1..9ca434c7ad 100644
--- a/test/fixtures/experimental/uncategorised/51/options.json
+++ b/test/fixtures/experimental/uncategorised/51/options.json
@@ -1,6 +1,4 @@
{
"sourceType": "module",
- "features": {
- "es7.exportExtensions": true
- }
-}
\ No newline at end of file
+ "plugins": ["exportExtensions"]
+}
diff --git a/test/fixtures/experimental/uncategorised/52/expected.json b/test/fixtures/experimental/uncategorised/52/expected.json
index ce4be697a2..56f6998476 100644
--- a/test/fixtures/experimental/uncategorised/52/expected.json
+++ b/test/fixtures/experimental/uncategorised/52/expected.json
@@ -76,7 +76,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 16,
"end": 21,
"loc": {
@@ -89,11 +89,14 @@
"column": 21
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/52/options.json b/test/fixtures/experimental/uncategorised/52/options.json
index dab8dec6a1..9ca434c7ad 100644
--- a/test/fixtures/experimental/uncategorised/52/options.json
+++ b/test/fixtures/experimental/uncategorised/52/options.json
@@ -1,6 +1,4 @@
{
"sourceType": "module",
- "features": {
- "es7.exportExtensions": true
- }
-}
\ No newline at end of file
+ "plugins": ["exportExtensions"]
+}
diff --git a/test/fixtures/experimental/uncategorised/53/expected.json b/test/fixtures/experimental/uncategorised/53/expected.json
index 2808aa7406..8e1fc31aea 100644
--- a/test/fixtures/experimental/uncategorised/53/expected.json
+++ b/test/fixtures/experimental/uncategorised/53/expected.json
@@ -76,7 +76,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 20,
"end": 25,
"loc": {
@@ -89,11 +89,14 @@
"column": 25
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/53/options.json b/test/fixtures/experimental/uncategorised/53/options.json
index dab8dec6a1..9ca434c7ad 100644
--- a/test/fixtures/experimental/uncategorised/53/options.json
+++ b/test/fixtures/experimental/uncategorised/53/options.json
@@ -1,6 +1,4 @@
{
"sourceType": "module",
- "features": {
- "es7.exportExtensions": true
- }
-}
\ No newline at end of file
+ "plugins": ["exportExtensions"]
+}
diff --git a/test/fixtures/experimental/uncategorised/54/expected.json b/test/fixtures/experimental/uncategorised/54/expected.json
index a8787da9bf..90607f31ac 100644
--- a/test/fixtures/experimental/uncategorised/54/expected.json
+++ b/test/fixtures/experimental/uncategorised/54/expected.json
@@ -76,7 +76,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 21,
"end": 26,
"loc": {
@@ -89,11 +89,14 @@
"column": 26
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/54/options.json b/test/fixtures/experimental/uncategorised/54/options.json
index dab8dec6a1..9ca434c7ad 100644
--- a/test/fixtures/experimental/uncategorised/54/options.json
+++ b/test/fixtures/experimental/uncategorised/54/options.json
@@ -1,6 +1,4 @@
{
"sourceType": "module",
- "features": {
- "es7.exportExtensions": true
- }
-}
\ No newline at end of file
+ "plugins": ["exportExtensions"]
+}
diff --git a/test/fixtures/experimental/uncategorised/55/expected.json b/test/fixtures/experimental/uncategorised/55/expected.json
index 7f7e0e35a4..1616be3690 100644
--- a/test/fixtures/experimental/uncategorised/55/expected.json
+++ b/test/fixtures/experimental/uncategorised/55/expected.json
@@ -90,7 +90,7 @@
"name": "n"
},
{
- "type": "Literal",
+ "type": "StringLiteral",
"start": 7,
"end": 10,
"loc": {
@@ -103,12 +103,14 @@
"column": 10
}
},
- "value": "=",
- "rawValue": "=",
- "raw": "'='"
+ "extra": {
+ "rawValue": "=",
+ "raw": "'='"
+ },
+ "value": "="
},
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 13,
"loc": {
@@ -121,13 +123,16 @@
"column": 13
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/55/options.json b/test/fixtures/experimental/uncategorised/55/options.json
index 6c4b46d000..f0d10aef27 100644
--- a/test/fixtures/experimental/uncategorised/55/options.json
+++ b/test/fixtures/experimental/uncategorised/55/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.trailingFunctionCommas": true
- }
-}
\ No newline at end of file
+ "plugins": ["trailingFunctionCommas"]
+}
diff --git a/test/fixtures/experimental/uncategorised/56/options.json b/test/fixtures/experimental/uncategorised/56/options.json
index 6c4b46d000..f0d10aef27 100644
--- a/test/fixtures/experimental/uncategorised/56/options.json
+++ b/test/fixtures/experimental/uncategorised/56/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.trailingFunctionCommas": true
- }
-}
\ No newline at end of file
+ "plugins": ["trailingFunctionCommas"]
+}
diff --git a/test/fixtures/experimental/uncategorised/57/expected.json b/test/fixtures/experimental/uncategorised/57/expected.json
index ebb3ee0019..84ddd9f145 100644
--- a/test/fixtures/experimental/uncategorised/57/expected.json
+++ b/test/fixtures/experimental/uncategorised/57/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 12,
"end": 23,
"loc": {
@@ -107,62 +107,49 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 15,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
"end": 23,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 20
},
"end": {
"line": 1,
"column": 23
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 16,
- "end": 17,
- "loc": {
- "start": {
- "line": 1,
- "column": 16
- },
- "end": {
- "line": 1,
- "column": 17
- }
- },
- "name": "a"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 20,
- "end": 23,
- "loc": {
- "start": {
- "line": 1,
- "column": 20
- },
- "end": {
- "line": 1,
- "column": 23
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/57/options.json b/test/fixtures/experimental/uncategorised/57/options.json
index 6c4b46d000..f0d10aef27 100644
--- a/test/fixtures/experimental/uncategorised/57/options.json
+++ b/test/fixtures/experimental/uncategorised/57/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.trailingFunctionCommas": true
- }
-}
\ No newline at end of file
+ "plugins": ["trailingFunctionCommas"]
+}
diff --git a/test/fixtures/experimental/uncategorised/58/expected.json b/test/fixtures/experimental/uncategorised/58/expected.json
index 81f0200f6c..e6a73fb255 100644
--- a/test/fixtures/experimental/uncategorised/58/expected.json
+++ b/test/fixtures/experimental/uncategorised/58/expected.json
@@ -94,7 +94,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 13,
"loc": {
@@ -107,12 +107,15 @@
"column": 13
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/58/options.json b/test/fixtures/experimental/uncategorised/58/options.json
index 6c4b46d000..f0d10aef27 100644
--- a/test/fixtures/experimental/uncategorised/58/options.json
+++ b/test/fixtures/experimental/uncategorised/58/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.trailingFunctionCommas": true
- }
-}
\ No newline at end of file
+ "plugins": ["trailingFunctionCommas"]
+}
diff --git a/test/fixtures/experimental/uncategorised/59/options.json b/test/fixtures/experimental/uncategorised/59/options.json
index 0ed6fd677f..3c571eea7a 100644
--- a/test/fixtures/experimental/uncategorised/59/options.json
+++ b/test/fixtures/experimental/uncategorised/59/options.json
@@ -1,6 +1,4 @@
{
- "features": {
- "es7.trailingFunctionCommas": true
- },
+ "plugins": ["trailingFunctionCommas"],
"throws": "Unexpected token (1:4)"
-}
\ No newline at end of file
+}
diff --git a/test/fixtures/experimental/uncategorised/6/expected.json b/test/fixtures/experimental/uncategorised/6/expected.json
index 15ed38285c..755abf8daa 100644
--- a/test/fixtures/experimental/uncategorised/6/expected.json
+++ b/test/fixtures/experimental/uncategorised/6/expected.json
@@ -57,7 +57,7 @@
}
},
"left": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 1,
"loc": {
@@ -70,9 +70,11 @@
"column": 1
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
},
"operator": "**",
"right": {
@@ -90,7 +92,7 @@
}
},
"left": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 5,
"end": 6,
"loc": {
@@ -103,13 +105,15 @@
"column": 6
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
},
"operator": "**",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 11,
"loc": {
@@ -122,13 +126,16 @@
"column": 11
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/6/options.json b/test/fixtures/experimental/uncategorised/6/options.json
index 875943b10b..d01676b6ba 100644
--- a/test/fixtures/experimental/uncategorised/6/options.json
+++ b/test/fixtures/experimental/uncategorised/6/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.exponentiationOperator": true
- }
-}
\ No newline at end of file
+ "plugins": ["exponentiationOperator"]
+}
diff --git a/test/fixtures/experimental/uncategorised/60/options.json b/test/fixtures/experimental/uncategorised/60/options.json
index 102842d3a2..8615cfcc03 100644
--- a/test/fixtures/experimental/uncategorised/60/options.json
+++ b/test/fixtures/experimental/uncategorised/60/options.json
@@ -1,6 +1,4 @@
{
- "features": {
- "es7.trailingFunctionCommas": true
- },
+ "plugins": ["trailingFunctionCommas"],
"throws": "Unexpected token (1:13)"
-}
\ No newline at end of file
+}
diff --git a/test/fixtures/experimental/uncategorised/61/options.json b/test/fixtures/experimental/uncategorised/61/options.json
index cb7b1732e1..7c23acbd30 100644
--- a/test/fixtures/experimental/uncategorised/61/options.json
+++ b/test/fixtures/experimental/uncategorised/61/options.json
@@ -1,6 +1,4 @@
{
- "features": {
- "es7.trailingFunctionCommas": true
- },
+ "plugins": ["trailingFunctionCommas"],
"throws": "Unexpected token (1:7)"
-}
\ No newline at end of file
+}
diff --git a/test/fixtures/experimental/uncategorised/62/expected.json b/test/fixtures/experimental/uncategorised/62/expected.json
index 5b29d24e51..8b52f4f5bb 100644
--- a/test/fixtures/experimental/uncategorised/62/expected.json
+++ b/test/fixtures/experimental/uncategorised/62/expected.json
@@ -124,7 +124,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "NullLiteral",
"start": 19,
"end": 23,
"loc": {
@@ -136,10 +136,7 @@
"line": 1,
"column": 23
}
- },
- "value": null,
- "rawValue": null,
- "raw": "null"
+ }
}
}
]
@@ -182,4 +179,4 @@
}
]
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/62/options.json b/test/fixtures/experimental/uncategorised/62/options.json
index b0f989baa5..d760b0afda 100644
--- a/test/fixtures/experimental/uncategorised/62/options.json
+++ b/test/fixtures/experimental/uncategorised/62/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.decorators": true
- }
+ "plugins": ["decorators"]
}
diff --git a/test/fixtures/experimental/uncategorised/7/expected.json b/test/fixtures/experimental/uncategorised/7/expected.json
index 2bf4b6353d..b07c383c1c 100644
--- a/test/fixtures/experimental/uncategorised/7/expected.json
+++ b/test/fixtures/experimental/uncategorised/7/expected.json
@@ -71,7 +71,7 @@
}
},
"left": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 1,
"end": 2,
"loc": {
@@ -84,9 +84,11 @@
"column": 2
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
},
"operator": "**",
"right": {
@@ -106,7 +108,7 @@
"operator": "-",
"prefix": true,
"argument": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 7,
"end": 8,
"loc": {
@@ -119,16 +121,20 @@
"column": 8
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
},
"operator": "*",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 13,
"loc": {
@@ -141,12 +147,15 @@
"column": 13
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/7/options.json b/test/fixtures/experimental/uncategorised/7/options.json
index 875943b10b..d01676b6ba 100644
--- a/test/fixtures/experimental/uncategorised/7/options.json
+++ b/test/fixtures/experimental/uncategorised/7/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.exponentiationOperator": true
- }
-}
\ No newline at end of file
+ "plugins": ["exponentiationOperator"]
+}
diff --git a/test/fixtures/experimental/uncategorised/8/expected.json b/test/fixtures/experimental/uncategorised/8/expected.json
index f9cf647bff..71d29e12cf 100644
--- a/test/fixtures/experimental/uncategorised/8/expected.json
+++ b/test/fixtures/experimental/uncategorised/8/expected.json
@@ -71,7 +71,7 @@
}
},
"left": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 1,
"loc": {
@@ -84,9 +84,11 @@
"column": 1
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
},
"operator": "**",
"right": {
@@ -106,7 +108,7 @@
"operator": "-",
"prefix": true,
"argument": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 7,
"loc": {
@@ -119,15 +121,17 @@
"column": 7
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
},
"operator": "*",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 11,
"loc": {
@@ -140,12 +144,15 @@
"column": 11
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/8/options.json b/test/fixtures/experimental/uncategorised/8/options.json
index 875943b10b..d01676b6ba 100644
--- a/test/fixtures/experimental/uncategorised/8/options.json
+++ b/test/fixtures/experimental/uncategorised/8/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.exponentiationOperator": true
- }
-}
\ No newline at end of file
+ "plugins": ["exponentiationOperator"]
+}
diff --git a/test/fixtures/experimental/uncategorised/9/expected.json b/test/fixtures/experimental/uncategorised/9/expected.json
index f1dfa90a4f..5ee0540170 100644
--- a/test/fixtures/experimental/uncategorised/9/expected.json
+++ b/test/fixtures/experimental/uncategorised/9/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "SpreadProperty",
+ "type": "RestProperty",
"start": 5,
"end": 9,
"loc": {
@@ -125,6 +125,7 @@
],
"kind": "let"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/experimental/uncategorised/9/options.json b/test/fixtures/experimental/uncategorised/9/options.json
index 0d83328100..4de042a697 100644
--- a/test/fixtures/experimental/uncategorised/9/options.json
+++ b/test/fixtures/experimental/uncategorised/9/options.json
@@ -1,5 +1,3 @@
{
- "features": {
- "es7.objectRestSpread": true
- }
-}
\ No newline at end of file
+ "plugins": ["objectRestSpread"]
+}
diff --git a/test/fixtures/flow/bounded-polymorphism/2/expected.json b/test/fixtures/flow/bounded-polymorphism/2/expected.json
index 8231ece78f..78dc7a10ed 100644
--- a/test/fixtures/flow/bounded-polymorphism/2/expected.json
+++ b/test/fixtures/flow/bounded-polymorphism/2/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"typeParameters": {
"type": "TypeParameterDeclaration",
"start": 12,
@@ -154,10 +153,11 @@
"column": 29
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/declare-module/2/expected.json b/test/fixtures/flow/declare-module/2/expected.json
index 71ef4876cd..887e105b6e 100644
--- a/test/fixtures/flow/declare-module/2/expected.json
+++ b/test/fixtures/flow/declare-module/2/expected.json
@@ -43,7 +43,7 @@
}
},
"id": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 15,
"end": 25,
"loc": {
@@ -56,9 +56,11 @@
"column": 25
}
},
- "value": "./a/b.js",
- "rawValue": "./a/b.js",
- "raw": "\"./a/b.js\""
+ "extra": {
+ "rawValue": "./a/b.js",
+ "raw": "\"./a/b.js\""
+ },
+ "value": "./a/b.js"
},
"body": {
"type": "BlockStatement",
@@ -77,7 +79,7 @@
"body": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/literal-types/number-binary/expected.json b/test/fixtures/flow/literal-types/number-binary/expected.json
index 2f19c09446..2f0fde7e23 100644
--- a/test/fixtures/flow/literal-types/number-binary/expected.json
+++ b/test/fixtures/flow/literal-types/number-binary/expected.json
@@ -101,8 +101,10 @@
}
},
"value": 123,
- "rawValue": 123,
- "raw": "0b1111011"
+ "extra": {
+ "rawValue": 123,
+ "raw": "0b1111011"
+ }
}
}
},
@@ -111,7 +113,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/literal-types/number-float/expected.json b/test/fixtures/flow/literal-types/number-float/expected.json
index 6724acbc50..3b07b2d152 100644
--- a/test/fixtures/flow/literal-types/number-float/expected.json
+++ b/test/fixtures/flow/literal-types/number-float/expected.json
@@ -101,8 +101,10 @@
}
},
"value": 123,
- "rawValue": 123,
- "raw": "123.0"
+ "extra": {
+ "rawValue": 123,
+ "raw": "123.0"
+ }
}
}
},
@@ -111,7 +113,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/literal-types/number-integer/expected.json b/test/fixtures/flow/literal-types/number-integer/expected.json
index cda39f4468..dd2263c75e 100644
--- a/test/fixtures/flow/literal-types/number-integer/expected.json
+++ b/test/fixtures/flow/literal-types/number-integer/expected.json
@@ -101,8 +101,10 @@
}
},
"value": 123,
- "rawValue": 123,
- "raw": "123"
+ "extra": {
+ "rawValue": 123,
+ "raw": "123"
+ }
}
}
},
@@ -111,7 +113,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/literal-types/number-octal-2/expected.json b/test/fixtures/flow/literal-types/number-octal-2/expected.json
index 87d29f96e7..f57f036c6e 100644
--- a/test/fixtures/flow/literal-types/number-octal-2/expected.json
+++ b/test/fixtures/flow/literal-types/number-octal-2/expected.json
@@ -101,8 +101,10 @@
}
},
"value": 123,
- "rawValue": 123,
- "raw": "0o173"
+ "extra": {
+ "rawValue": 123,
+ "raw": "0o173"
+ }
}
}
},
@@ -111,7 +113,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/literal-types/number-octal/expected.json b/test/fixtures/flow/literal-types/number-octal/expected.json
index 43a7969885..bd69b4d140 100644
--- a/test/fixtures/flow/literal-types/number-octal/expected.json
+++ b/test/fixtures/flow/literal-types/number-octal/expected.json
@@ -101,8 +101,10 @@
}
},
"value": 123,
- "rawValue": 123,
- "raw": "0x7B"
+ "extra": {
+ "rawValue": 123,
+ "raw": "0x7B"
+ }
}
}
},
@@ -111,7 +113,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/literal-types/string-double/expected.json b/test/fixtures/flow/literal-types/string-double/expected.json
index 45f4f80820..75c50aa13a 100644
--- a/test/fixtures/flow/literal-types/string-double/expected.json
+++ b/test/fixtures/flow/literal-types/string-double/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -106,8 +105,10 @@
}
},
"value": "div",
- "rawValue": "div",
- "raw": "\"div\""
+ "extra": {
+ "rawValue": "div",
+ "raw": "\"div\""
+ }
}
}
}
@@ -173,10 +174,11 @@
"column": 57
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/literal-types/string-single/expected.json b/test/fixtures/flow/literal-types/string-single/expected.json
index c231dace04..e168fb2f91 100644
--- a/test/fixtures/flow/literal-types/string-single/expected.json
+++ b/test/fixtures/flow/literal-types/string-single/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -106,8 +105,10 @@
}
},
"value": "div",
- "rawValue": "div",
- "raw": "'div'"
+ "extra": {
+ "rawValue": "div",
+ "raw": "'div'"
+ }
}
}
}
@@ -173,10 +174,11 @@
"column": 57
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/options.json b/test/fixtures/flow/options.json
index c1331af184..1844b1df3c 100644
--- a/test/fixtures/flow/options.json
+++ b/test/fixtures/flow/options.json
@@ -1,5 +1,4 @@
{
"sourceType": "module",
- "plugins": { "jsx": true, "flow": true },
- "features": { "es7.asyncFunctions": true }
+ "plugins": ["jsx", "flow", "asyncFunctions"]
}
diff --git a/test/fixtures/flow/regression/.arrow-function-parens-with-return-type/actual.js b/test/fixtures/flow/regression/.arrow-function-parens-with-return-type/actual.js
new file mode 100644
index 0000000000..0d85be0d03
--- /dev/null
+++ b/test/fixtures/flow/regression/.arrow-function-parens-with-return-type/actual.js
@@ -0,0 +1 @@
+var foo = ((foo)): string => {};
diff --git a/test/fixtures/flow/regression/.arrow-function-parens-with-return-type/expected.json b/test/fixtures/flow/regression/.arrow-function-parens-with-return-type/expected.json
new file mode 100644
index 0000000000..4fba0bba88
--- /dev/null
+++ b/test/fixtures/flow/regression/.arrow-function-parens-with-return-type/expected.json
@@ -0,0 +1,166 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "foo"
+ },
+ "init": {
+ "type": "ArrowFunctionExpression",
+ "start": 10,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "foo",
+ "parenthesizedExpression": true
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 29,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "body": []
+ },
+ "returnType": {
+ "type": "TypeAnnotation",
+ "start": 17,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "typeAnnotation": {
+ "type": "StringTypeAnnotation",
+ "start": 19,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ }
+ }
+ }
+ }
+ }
+ ],
+ "kind": "var"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/flow/regression/.arrow-function-parens-with-return-type/options.json b/test/fixtures/flow/regression/.arrow-function-parens-with-return-type/options.json
new file mode 100644
index 0000000000..e806dd7b3a
--- /dev/null
+++ b/test/fixtures/flow/regression/.arrow-function-parens-with-return-type/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:17)"
+}
diff --git a/test/fixtures/flow/regression/issue-2083/expected.json b/test/fixtures/flow/regression/issue-2083/expected.json
index 41723449a1..9fc301b2fd 100644
--- a/test/fixtures/flow/regression/issue-2083/expected.json
+++ b/test/fixtures/flow/regression/issue-2083/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 14,
"end": 110,
"loc": {
@@ -107,92 +107,94 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 17,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
"end": 110,
"loc": {
"start": {
"line": 2,
- "column": 5
+ "column": 8
},
"end": {
"line": 6,
"column": 3
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 20,
- "end": 110,
- "loc": {
- "start": {
- "line": 2,
- "column": 8
+ "body": [
+ {
+ "type": "SwitchStatement",
+ "start": 26,
+ "end": 106,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 5,
+ "column": 5
+ }
},
- "end": {
- "line": 6,
- "column": 3
- }
- },
- "body": [
- {
- "type": "SwitchStatement",
- "start": 26,
- "end": 106,
+ "discriminant": {
+ "type": "NumberLiteral",
+ "start": 34,
+ "end": 35,
"loc": {
"start": {
"line": 3,
- "column": 4
+ "column": 12
},
"end": {
- "line": 5,
- "column": 5
+ "line": 3,
+ "column": 13
}
},
- "discriminant": {
- "type": "Literal",
- "start": 34,
- "end": 35,
- "loc": {
- "start": {
- "line": 3,
- "column": 12
- },
- "end": {
- "line": 3,
- "column": 13
- }
- },
- "value": 1,
+ "extra": {
"rawValue": 1,
"raw": "1"
},
- "cases": [
- {
- "type": "SwitchCase",
- "start": 45,
- "end": 100,
+ "value": 1
+ },
+ "cases": [
+ {
+ "type": "SwitchCase",
+ "start": 45,
+ "end": 100,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 61
+ }
+ },
+ "consequent": [],
+ "test": {
+ "type": "BinaryExpression",
+ "start": 51,
+ "end": 98,
"loc": {
"start": {
"line": 4,
- "column": 6
+ "column": 12
},
"end": {
"line": 4,
- "column": 61
+ "column": 59
}
},
- "consequent": [],
- "test": {
- "type": "BinaryExpression",
+ "left": {
+ "type": "MemberExpression",
"start": 51,
- "end": 98,
+ "end": 71,
"loc": {
"start": {
"line": 4,
@@ -200,117 +202,105 @@
},
"end": {
"line": 4,
- "column": 59
+ "column": 32
}
},
- "left": {
- "type": "MemberExpression",
+ "object": {
+ "type": "Identifier",
"start": 51,
- "end": 71,
+ "end": 61,
"loc": {
"start": {
"line": 4,
"column": 12
},
+ "end": {
+ "line": 4,
+ "column": 22
+ }
+ },
+ "name": "MatrixType"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 62,
+ "end": 71,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 23
+ },
"end": {
"line": 4,
"column": 32
}
},
- "object": {
- "type": "Identifier",
- "start": 51,
- "end": 61,
- "loc": {
- "start": {
- "line": 4,
- "column": 12
- },
- "end": {
- "line": 4,
- "column": 22
- }
- },
- "name": "MatrixType"
- },
- "property": {
- "type": "Identifier",
- "start": 62,
- "end": 71,
- "loc": {
- "start": {
- "line": 4,
- "column": 23
- },
- "end": {
- "line": 4,
- "column": 32
- }
- },
- "name": "IsScaling"
- },
- "computed": false
+ "name": "IsScaling"
},
- "operator": "|",
- "right": {
- "type": "MemberExpression",
+ "computed": false
+ },
+ "operator": "|",
+ "right": {
+ "type": "MemberExpression",
+ "start": 74,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 35
+ },
+ "end": {
+ "line": 4,
+ "column": 59
+ }
+ },
+ "object": {
+ "type": "Identifier",
"start": 74,
- "end": 98,
+ "end": 84,
"loc": {
"start": {
"line": 4,
"column": 35
},
+ "end": {
+ "line": 4,
+ "column": 45
+ }
+ },
+ "name": "MatrixType"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 85,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 46
+ },
"end": {
"line": 4,
"column": 59
}
},
- "object": {
- "type": "Identifier",
- "start": 74,
- "end": 84,
- "loc": {
- "start": {
- "line": 4,
- "column": 35
- },
- "end": {
- "line": 4,
- "column": 45
- }
- },
- "name": "MatrixType"
- },
- "property": {
- "type": "Identifier",
- "start": 85,
- "end": 98,
- "loc": {
- "start": {
- "line": 4,
- "column": 46
- },
- "end": {
- "line": 4,
- "column": 59
- }
- },
- "name": "IsTranslation"
- },
- "computed": false
+ "name": "IsTranslation"
},
- "parenthesizedExpression": true
+ "computed": false
+ },
+ "extra": {
+ "parenthesized": true
}
}
- ]
- }
- ]
- }
+ }
+ ]
+ }
+ ],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 114,
"end": 162,
"loc": {
@@ -342,72 +332,72 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 117,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 120,
"end": 162,
"loc": {
"start": {
"line": 8,
- "column": 5
+ "column": 8
},
"end": {
"line": 10,
"column": 3
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 120,
- "end": 162,
- "loc": {
- "start": {
- "line": 8,
- "column": 8
+ "body": [
+ {
+ "type": "SwitchStatement",
+ "start": 126,
+ "end": 158,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 36
+ }
},
- "end": {
- "line": 10,
- "column": 3
- }
- },
- "body": [
- {
- "type": "SwitchStatement",
- "start": 126,
- "end": 158,
+ "discriminant": {
+ "type": "BinaryExpression",
+ "start": 134,
+ "end": 154,
"loc": {
"start": {
"line": 9,
- "column": 4
+ "column": 12
},
"end": {
"line": 9,
- "column": 36
+ "column": 32
}
},
- "discriminant": {
+ "left": {
"type": "BinaryExpression",
- "start": 134,
- "end": 154,
+ "start": 135,
+ "end": 145,
"loc": {
"start": {
"line": 9,
- "column": 12
+ "column": 13
},
"end": {
"line": 9,
- "column": 32
+ "column": 23
}
},
"left": {
- "type": "BinaryExpression",
+ "type": "Identifier",
"start": 135,
- "end": 145,
+ "end": 140,
"loc": {
"start": {
"line": 9,
@@ -415,73 +405,64 @@
},
"end": {
"line": 9,
- "column": 23
+ "column": 18
}
},
- "left": {
- "type": "Identifier",
- "start": 135,
- "end": 140,
- "loc": {
- "start": {
- "line": 9,
- "column": 13
- },
- "end": {
- "line": 9,
- "column": 18
- }
- },
- "name": "typeA"
- },
- "operator": "<<",
- "right": {
- "type": "Literal",
- "start": 144,
- "end": 145,
- "loc": {
- "start": {
- "line": 9,
- "column": 22
- },
- "end": {
- "line": 9,
- "column": 23
- }
- },
- "value": 4,
- "rawValue": 4,
- "raw": "4"
- },
- "parenthesizedExpression": true
+ "name": "typeA"
},
- "operator": "|",
+ "operator": "<<",
"right": {
- "type": "Identifier",
- "start": 149,
- "end": 154,
+ "type": "NumberLiteral",
+ "start": 144,
+ "end": 145,
"loc": {
"start": {
"line": 9,
- "column": 27
+ "column": 22
},
"end": {
"line": 9,
- "column": 32
+ "column": 23
}
},
- "name": "typeB"
+ "extra": {
+ "rawValue": 4,
+ "raw": "4"
+ },
+ "value": 4
+ },
+ "extra": {
+ "parenthesized": true
}
},
- "cases": []
- }
- ]
- }
+ "operator": "|",
+ "right": {
+ "type": "Identifier",
+ "start": 149,
+ "end": 154,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 27
+ },
+ "end": {
+ "line": 9,
+ "column": 32
+ }
+ },
+ "name": "typeB"
+ }
+ },
+ "cases": []
+ }
+ ],
+ "directives": []
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/flow/tuples/3/expected.json b/test/fixtures/flow/tuples/3/expected.json
index 986bbd31ac..0febab6ded 100644
--- a/test/fixtures/flow/tuples/3/expected.json
+++ b/test/fixtures/flow/tuples/3/expected.json
@@ -136,7 +136,7 @@
},
"elements": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 21,
"end": 24,
"loc": {
@@ -149,9 +149,11 @@
"column": 24
}
},
- "value": 123,
- "rawValue": 123,
- "raw": "123"
+ "extra": {
+ "rawValue": 123,
+ "raw": "123"
+ },
+ "value": 123
}
]
}
@@ -159,7 +161,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/tuples/4/expected.json b/test/fixtures/flow/tuples/4/expected.json
index f78dc3b679..4834619f1a 100644
--- a/test/fixtures/flow/tuples/4/expected.json
+++ b/test/fixtures/flow/tuples/4/expected.json
@@ -151,7 +151,7 @@
},
"elements": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 28,
"end": 31,
"loc": {
@@ -164,12 +164,14 @@
"column": 31
}
},
- "value": 123,
- "rawValue": 123,
- "raw": "123"
+ "extra": {
+ "rawValue": 123,
+ "raw": "123"
+ },
+ "value": 123
},
{
- "type": "Literal",
+ "type": "StringLiteral",
"start": 33,
"end": 39,
"loc": {
@@ -182,9 +184,11 @@
"column": 39
}
},
- "value": "duck",
- "rawValue": "duck",
- "raw": "\"duck\""
+ "extra": {
+ "rawValue": "duck",
+ "raw": "\"duck\""
+ },
+ "value": "duck"
}
]
}
@@ -192,7 +196,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/69/actual.js b/test/fixtures/flow/type-annotations/.69/actual.js
similarity index 100%
rename from test/fixtures/flow/type-annotations/69/actual.js
rename to test/fixtures/flow/type-annotations/.69/actual.js
diff --git a/test/fixtures/flow/type-annotations/69/expected.json b/test/fixtures/flow/type-annotations/.69/expected.json
similarity index 100%
rename from test/fixtures/flow/type-annotations/69/expected.json
rename to test/fixtures/flow/type-annotations/.69/expected.json
diff --git a/test/fixtures/flow/type-annotations/70/actual.js b/test/fixtures/flow/type-annotations/.70/actual.js
similarity index 100%
rename from test/fixtures/flow/type-annotations/70/actual.js
rename to test/fixtures/flow/type-annotations/.70/actual.js
diff --git a/test/fixtures/flow/type-annotations/70/expected.json b/test/fixtures/flow/type-annotations/.70/expected.json
similarity index 100%
rename from test/fixtures/flow/type-annotations/70/expected.json
rename to test/fixtures/flow/type-annotations/.70/expected.json
diff --git a/test/fixtures/flow/type-annotations/71/actual.js b/test/fixtures/flow/type-annotations/.71/actual.js
similarity index 100%
rename from test/fixtures/flow/type-annotations/71/actual.js
rename to test/fixtures/flow/type-annotations/.71/actual.js
diff --git a/test/fixtures/flow/type-annotations/71/expected.json b/test/fixtures/flow/type-annotations/.71/expected.json
similarity index 100%
rename from test/fixtures/flow/type-annotations/71/expected.json
rename to test/fixtures/flow/type-annotations/.71/expected.json
diff --git a/test/fixtures/flow/type-annotations/75/actual.js b/test/fixtures/flow/type-annotations/.75/actual.js
similarity index 100%
rename from test/fixtures/flow/type-annotations/75/actual.js
rename to test/fixtures/flow/type-annotations/.75/actual.js
diff --git a/test/fixtures/flow/type-annotations/75/expected.json b/test/fixtures/flow/type-annotations/.75/expected.json
similarity index 100%
rename from test/fixtures/flow/type-annotations/75/expected.json
rename to test/fixtures/flow/type-annotations/.75/expected.json
diff --git a/test/fixtures/flow/type-annotations/76/actual.js b/test/fixtures/flow/type-annotations/.76/actual.js
similarity index 100%
rename from test/fixtures/flow/type-annotations/76/actual.js
rename to test/fixtures/flow/type-annotations/.76/actual.js
diff --git a/test/fixtures/flow/type-annotations/76/expected.json b/test/fixtures/flow/type-annotations/.76/expected.json
similarity index 100%
rename from test/fixtures/flow/type-annotations/76/expected.json
rename to test/fixtures/flow/type-annotations/.76/expected.json
diff --git a/test/fixtures/flow/type-annotations/77/actual.js b/test/fixtures/flow/type-annotations/.77/actual.js
similarity index 100%
rename from test/fixtures/flow/type-annotations/77/actual.js
rename to test/fixtures/flow/type-annotations/.77/actual.js
diff --git a/test/fixtures/flow/type-annotations/77/expected.json b/test/fixtures/flow/type-annotations/.77/expected.json
similarity index 100%
rename from test/fixtures/flow/type-annotations/77/expected.json
rename to test/fixtures/flow/type-annotations/.77/expected.json
diff --git a/test/fixtures/flow/type-annotations/1/expected.json b/test/fixtures/flow/type-annotations/1/expected.json
index a2eead1323..4d022b66ad 100644
--- a/test/fixtures/flow/type-annotations/1/expected.json
+++ b/test/fixtures/flow/type-annotations/1/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -169,10 +168,11 @@
"column": 44
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/10/expected.json b/test/fixtures/flow/type-annotations/10/expected.json
index a9c9b078b2..6aae036622 100644
--- a/test/fixtures/flow/type-annotations/10/expected.json
+++ b/test/fixtures/flow/type-annotations/10/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -236,10 +235,11 @@
"column": 56
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/11/expected.json b/test/fixtures/flow/type-annotations/11/expected.json
index 9e64b8c0cd..5de62117eb 100644
--- a/test/fixtures/flow/type-annotations/11/expected.json
+++ b/test/fixtures/flow/type-annotations/11/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -283,10 +282,11 @@
"column": 67
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/12/expected.json b/test/fixtures/flow/type-annotations/12/expected.json
index 5f22620819..fddf075029 100644
--- a/test/fixtures/flow/type-annotations/12/expected.json
+++ b/test/fixtures/flow/type-annotations/12/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [],
"returnType": {
"type": "TypeAnnotation",
@@ -106,10 +105,11 @@
"column": 23
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/13/expected.json b/test/fixtures/flow/type-annotations/13/expected.json
index 85d1d32dff..1070cfbe37 100644
--- a/test/fixtures/flow/type-annotations/13/expected.json
+++ b/test/fixtures/flow/type-annotations/13/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [],
"returnType": {
"type": "TypeAnnotation",
@@ -124,10 +123,11 @@
"column": 27
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/14/expected.json b/test/fixtures/flow/type-annotations/14/expected.json
index 1cdbf9b15e..96fb6480b2 100644
--- a/test/fixtures/flow/type-annotations/14/expected.json
+++ b/test/fixtures/flow/type-annotations/14/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [],
"returnType": {
"type": "TypeAnnotation",
@@ -172,10 +171,11 @@
"column": 35
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/15/expected.json b/test/fixtures/flow/type-annotations/15/expected.json
index 08e4a71f0d..310bd0ca0c 100644
--- a/test/fixtures/flow/type-annotations/15/expected.json
+++ b/test/fixtures/flow/type-annotations/15/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [],
"returnType": {
"type": "TypeAnnotation",
@@ -172,10 +171,11 @@
"column": 36
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/16/expected.json b/test/fixtures/flow/type-annotations/16/expected.json
index c4db0ece72..392f618655 100644
--- a/test/fixtures/flow/type-annotations/16/expected.json
+++ b/test/fixtures/flow/type-annotations/16/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [],
"returnType": {
"type": "TypeAnnotation",
@@ -109,10 +108,11 @@
"column": 21
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/17/expected.json b/test/fixtures/flow/type-annotations/17/expected.json
index 944df2b6b8..0e9b768068 100644
--- a/test/fixtures/flow/type-annotations/17/expected.json
+++ b/test/fixtures/flow/type-annotations/17/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"typeParameters": {
"type": "TypeParameterDeclaration",
"start": 12,
@@ -109,10 +108,11 @@
"column": 20
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/18/expected.json b/test/fixtures/flow/type-annotations/18/expected.json
index 3aa1cbb4f3..65eab403cc 100644
--- a/test/fixtures/flow/type-annotations/18/expected.json
+++ b/test/fixtures/flow/type-annotations/18/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"typeParameters": {
"type": "TypeParameterDeclaration",
"start": 12,
@@ -125,10 +124,11 @@
"column": 22
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/19/expected.json b/test/fixtures/flow/type-annotations/19/expected.json
index 1e7c605330..6102f7fad4 100644
--- a/test/fixtures/flow/type-annotations/19/expected.json
+++ b/test/fixtures/flow/type-annotations/19/expected.json
@@ -90,7 +90,6 @@
"id": null,
"generator": false,
"expression": false,
- "async": false,
"typeParameters": {
"type": "TypeParameterDeclaration",
"start": 10,
@@ -155,12 +154,13 @@
"column": 20
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/2/expected.json b/test/fixtures/flow/type-annotations/2/expected.json
index a70a9f9ec3..9f0c84fa45 100644
--- a/test/fixtures/flow/type-annotations/2/expected.json
+++ b/test/fixtures/flow/type-annotations/2/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -123,10 +122,11 @@
"column": 30
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/20/expected.json b/test/fixtures/flow/type-annotations/20/expected.json
index 9e80067a0b..e21b48d766 100644
--- a/test/fixtures/flow/type-annotations/20/expected.json
+++ b/test/fixtures/flow/type-annotations/20/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 3,
"end": 30,
"loc": {
@@ -122,95 +122,81 @@
"name": "fooProp"
},
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 14,
- "end": 30,
- "loc": {
- "start": {
- "line": 1,
- "column": 14
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
},
- "end": {
- "line": 1,
- "column": 30
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [
- {
- "type": "Identifier",
- "start": 15,
+ "name": "value",
+ "typeAnnotation": {
+ "type": "TypeAnnotation",
+ "start": 20,
"end": 27,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 20
},
"end": {
"line": 1,
"column": 27
}
},
- "name": "value",
"typeAnnotation": {
- "type": "TypeAnnotation",
- "start": 20,
+ "type": "NumberTypeAnnotation",
+ "start": 21,
"end": 27,
"loc": {
"start": {
"line": 1,
- "column": 20
+ "column": 21
},
"end": {
"line": 1,
"column": 27
}
- },
- "typeAnnotation": {
- "type": "NumberTypeAnnotation",
- "start": 21,
- "end": 27,
- "loc": {
- "start": {
- "line": 1,
- "column": 21
- },
- "end": {
- "line": 1,
- "column": 27
- }
- }
}
}
}
- ],
- "body": {
- "type": "BlockStatement",
- "start": 28,
- "end": 30,
- "loc": {
- "start": {
- "line": 1,
- "column": 28
- },
- "end": {
- "line": 1,
- "column": 30
- }
- },
- "body": []
}
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 28,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/21/expected.json b/test/fixtures/flow/type-annotations/21/expected.json
index f9913f979f..d1ddc78e40 100644
--- a/test/fixtures/flow/type-annotations/21/expected.json
+++ b/test/fixtures/flow/type-annotations/21/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 3,
"end": 35,
"loc": {
@@ -122,125 +122,111 @@
"name": "fooProp"
},
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 14,
- "end": 35,
- "loc": {
- "start": {
- "line": 1,
- "column": 14
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
},
- "end": {
- "line": 1,
- "column": 35
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [
- {
- "type": "Identifier",
- "start": 15,
+ "name": "value",
+ "typeAnnotation": {
+ "type": "TypeAnnotation",
+ "start": 20,
"end": 27,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 20
},
"end": {
"line": 1,
"column": 27
}
},
- "name": "value",
"typeAnnotation": {
- "type": "TypeAnnotation",
- "start": 20,
+ "type": "NumberTypeAnnotation",
+ "start": 21,
"end": 27,
"loc": {
"start": {
"line": 1,
- "column": 20
+ "column": 21
},
"end": {
"line": 1,
"column": 27
}
- },
- "typeAnnotation": {
- "type": "NumberTypeAnnotation",
- "start": 21,
- "end": 27,
- "loc": {
- "start": {
- "line": 1,
- "column": 21
- },
- "end": {
- "line": 1,
- "column": 27
- }
- }
}
}
}
- ],
- "returnType": {
- "type": "TypeAnnotation",
- "start": 28,
+ }
+ ],
+ "returnType": {
+ "type": "TypeAnnotation",
+ "start": 28,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "typeAnnotation": {
+ "type": "VoidTypeAnnotation",
+ "start": 29,
"end": 33,
"loc": {
"start": {
"line": 1,
- "column": 28
+ "column": 29
},
"end": {
"line": 1,
"column": 33
}
- },
- "typeAnnotation": {
- "type": "VoidTypeAnnotation",
- "start": 29,
- "end": 33,
- "loc": {
- "start": {
- "line": 1,
- "column": 29
- },
- "end": {
- "line": 1,
- "column": 33
- }
- }
}
- },
- "body": {
- "type": "BlockStatement",
- "start": 33,
- "end": 35,
- "loc": {
- "start": {
- "line": 1,
- "column": 33
- },
- "end": {
- "line": 1,
- "column": 35
- }
- },
- "body": []
}
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 33,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/22/expected.json b/test/fixtures/flow/type-annotations/22/expected.json
index 6f3faa4034..4725285737 100644
--- a/test/fixtures/flow/type-annotations/22/expected.json
+++ b/test/fixtures/flow/type-annotations/22/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 3,
"end": 25,
"loc": {
@@ -122,78 +122,64 @@
"name": "fooProp"
},
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 14,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [],
+ "returnType": {
+ "type": "TypeAnnotation",
+ "start": 16,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "typeAnnotation": {
+ "type": "NumberTypeAnnotation",
+ "start": 17,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ }
+ }
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
"end": 25,
"loc": {
"start": {
"line": 1,
- "column": 14
+ "column": 23
},
"end": {
"line": 1,
"column": 25
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [],
- "returnType": {
- "type": "TypeAnnotation",
- "start": 16,
- "end": 23,
- "loc": {
- "start": {
- "line": 1,
- "column": 16
- },
- "end": {
- "line": 1,
- "column": 23
- }
- },
- "typeAnnotation": {
- "type": "NumberTypeAnnotation",
- "start": 17,
- "end": 23,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 23
- }
- }
- }
- },
- "body": {
- "type": "BlockStatement",
- "start": 23,
- "end": 25,
- "loc": {
- "start": {
- "line": 1,
- "column": 23
- },
- "end": {
- "line": 1,
- "column": 25
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/23/expected.json b/test/fixtures/flow/type-annotations/23/expected.json
index d2ecdea08f..0eb9320e3c 100644
--- a/test/fixtures/flow/type-annotations/23/expected.json
+++ b/test/fixtures/flow/type-annotations/23/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 3,
"end": 20,
"loc": {
@@ -121,57 +121,58 @@
},
"name": "id"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 8,
- "end": 20,
- "loc": {
- "start": {
- "line": 1,
- "column": 8
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 9,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
},
- "end": {
- "line": 1,
- "column": 20
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [
- {
- "type": "Identifier",
- "start": 9,
+ "name": "x",
+ "typeAnnotation": {
+ "type": "TypeAnnotation",
+ "start": 10,
"end": 13,
"loc": {
"start": {
"line": 1,
- "column": 9
+ "column": 10
},
"end": {
"line": 1,
"column": 13
}
},
- "name": "x",
"typeAnnotation": {
- "type": "TypeAnnotation",
- "start": 10,
+ "type": "GenericTypeAnnotation",
+ "start": 12,
"end": 13,
"loc": {
"start": {
"line": 1,
- "column": 10
+ "column": 12
},
"end": {
"line": 1,
"column": 13
}
},
- "typeAnnotation": {
- "type": "GenericTypeAnnotation",
+ "typeParameters": null,
+ "id": {
+ "type": "Identifier",
"start": 12,
"end": 13,
"loc": {
@@ -184,43 +185,43 @@
"column": 13
}
},
- "typeParameters": null,
- "id": {
- "type": "Identifier",
- "start": 12,
- "end": 13,
- "loc": {
- "start": {
- "line": 1,
- "column": 12
- },
- "end": {
- "line": 1,
- "column": 13
- }
- },
- "name": "T"
- }
+ "name": "T"
}
}
}
- ],
- "returnType": {
- "type": "TypeAnnotation",
- "start": 14,
+ }
+ ],
+ "returnType": {
+ "type": "TypeAnnotation",
+ "start": 14,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "typeAnnotation": {
+ "type": "GenericTypeAnnotation",
+ "start": 16,
"end": 17,
"loc": {
"start": {
"line": 1,
- "column": 14
+ "column": 16
},
"end": {
"line": 1,
"column": 17
}
},
- "typeAnnotation": {
- "type": "GenericTypeAnnotation",
+ "typeParameters": null,
+ "id": {
+ "type": "Identifier",
"start": 16,
"end": 17,
"loc": {
@@ -233,81 +234,66 @@
"column": 17
}
},
- "typeParameters": null,
- "id": {
- "type": "Identifier",
- "start": 16,
- "end": 17,
- "loc": {
- "start": {
- "line": 1,
- "column": 16
- },
- "end": {
- "line": 1,
- "column": 17
- }
- },
- "name": "T"
- }
+ "name": "T"
+ }
+ }
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 20
}
},
- "body": {
- "type": "BlockStatement",
- "start": 18,
- "end": 20,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 20
- }
+ "body": [],
+ "directives": []
+ },
+ "typeParameters": {
+ "type": "TypeParameterDeclaration",
+ "start": 5,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
},
- "body": []
+ "end": {
+ "line": 1,
+ "column": 8
+ }
},
- "typeParameters": {
- "type": "TypeParameterDeclaration",
- "start": 5,
- "end": 8,
- "loc": {
- "start": {
- "line": 1,
- "column": 5
- },
- "end": {
- "line": 1,
- "column": 8
- }
- },
- "params": [
- {
- "type": "Identifier",
- "start": 6,
- "end": 7,
- "loc": {
- "start": {
- "line": 1,
- "column": 6
- },
- "end": {
- "line": 1,
- "column": 7
- }
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 6,
+ "end": 7,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
},
- "name": "T"
- }
- ]
- }
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "name": "T"
+ }
+ ]
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/24/expected.json b/test/fixtures/flow/type-annotations/24/expected.json
index 499369a52f..ef4b2fa15b 100644
--- a/test/fixtures/flow/type-annotations/24/expected.json
+++ b/test/fixtures/flow/type-annotations/24/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 3,
"end": 21,
"loc": {
@@ -121,57 +121,58 @@
},
"name": "id"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 9,
- "end": 21,
- "loc": {
- "start": {
- "line": 1,
- "column": 9
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 10,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
},
- "end": {
- "line": 1,
- "column": 21
- }
- },
- "id": null,
- "generator": true,
- "expression": false,
- "async": false,
- "params": [
- {
- "type": "Identifier",
- "start": 10,
+ "name": "x",
+ "typeAnnotation": {
+ "type": "TypeAnnotation",
+ "start": 11,
"end": 14,
"loc": {
"start": {
"line": 1,
- "column": 10
+ "column": 11
},
"end": {
"line": 1,
"column": 14
}
},
- "name": "x",
"typeAnnotation": {
- "type": "TypeAnnotation",
- "start": 11,
+ "type": "GenericTypeAnnotation",
+ "start": 13,
"end": 14,
"loc": {
"start": {
"line": 1,
- "column": 11
+ "column": 13
},
"end": {
"line": 1,
"column": 14
}
},
- "typeAnnotation": {
- "type": "GenericTypeAnnotation",
+ "typeParameters": null,
+ "id": {
+ "type": "Identifier",
"start": 13,
"end": 14,
"loc": {
@@ -184,43 +185,43 @@
"column": 14
}
},
- "typeParameters": null,
- "id": {
- "type": "Identifier",
- "start": 13,
- "end": 14,
- "loc": {
- "start": {
- "line": 1,
- "column": 13
- },
- "end": {
- "line": 1,
- "column": 14
- }
- },
- "name": "T"
- }
+ "name": "T"
}
}
}
- ],
- "returnType": {
- "type": "TypeAnnotation",
- "start": 15,
+ }
+ ],
+ "returnType": {
+ "type": "TypeAnnotation",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "typeAnnotation": {
+ "type": "GenericTypeAnnotation",
+ "start": 17,
"end": 18,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 17
},
"end": {
"line": 1,
"column": 18
}
},
- "typeAnnotation": {
- "type": "GenericTypeAnnotation",
+ "typeParameters": null,
+ "id": {
+ "type": "Identifier",
"start": 17,
"end": 18,
"loc": {
@@ -233,81 +234,66 @@
"column": 18
}
},
- "typeParameters": null,
- "id": {
- "type": "Identifier",
- "start": 17,
- "end": 18,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 18
- }
- },
- "name": "T"
- }
+ "name": "T"
+ }
+ }
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 21
}
},
- "body": {
- "type": "BlockStatement",
- "start": 19,
- "end": 21,
- "loc": {
- "start": {
- "line": 1,
- "column": 19
- },
- "end": {
- "line": 1,
- "column": 21
- }
+ "body": [],
+ "directives": []
+ },
+ "typeParameters": {
+ "type": "TypeParameterDeclaration",
+ "start": 6,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
},
- "body": []
+ "end": {
+ "line": 1,
+ "column": 9
+ }
},
- "typeParameters": {
- "type": "TypeParameterDeclaration",
- "start": 6,
- "end": 9,
- "loc": {
- "start": {
- "line": 1,
- "column": 6
- },
- "end": {
- "line": 1,
- "column": 9
- }
- },
- "params": [
- {
- "type": "Identifier",
- "start": 7,
- "end": 8,
- "loc": {
- "start": {
- "line": 1,
- "column": 7
- },
- "end": {
- "line": 1,
- "column": 8
- }
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
},
- "name": "T"
- }
- ]
- }
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "T"
+ }
+ ]
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/25/expected.json b/test/fixtures/flow/type-annotations/25/expected.json
index 7a1c41ce8a..f651d57f91 100644
--- a/test/fixtures/flow/type-annotations/25/expected.json
+++ b/test/fixtures/flow/type-annotations/25/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 3,
"end": 26,
"loc": {
@@ -121,57 +121,58 @@
},
"name": "id"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 14,
- "end": 26,
- "loc": {
- "start": {
- "line": 1,
- "column": 14
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
},
- "end": {
- "line": 1,
- "column": 26
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "async": true,
- "params": [
- {
- "type": "Identifier",
- "start": 15,
+ "name": "x",
+ "typeAnnotation": {
+ "type": "TypeAnnotation",
+ "start": 16,
"end": 19,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 16
},
"end": {
"line": 1,
"column": 19
}
},
- "name": "x",
"typeAnnotation": {
- "type": "TypeAnnotation",
- "start": 16,
+ "type": "GenericTypeAnnotation",
+ "start": 18,
"end": 19,
"loc": {
"start": {
"line": 1,
- "column": 16
+ "column": 18
},
"end": {
"line": 1,
"column": 19
}
},
- "typeAnnotation": {
- "type": "GenericTypeAnnotation",
+ "typeParameters": null,
+ "id": {
+ "type": "Identifier",
"start": 18,
"end": 19,
"loc": {
@@ -184,43 +185,43 @@
"column": 19
}
},
- "typeParameters": null,
- "id": {
- "type": "Identifier",
- "start": 18,
- "end": 19,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 19
- }
- },
- "name": "T"
- }
+ "name": "T"
}
}
}
- ],
- "returnType": {
- "type": "TypeAnnotation",
- "start": 20,
+ }
+ ],
+ "returnType": {
+ "type": "TypeAnnotation",
+ "start": 20,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "typeAnnotation": {
+ "type": "GenericTypeAnnotation",
+ "start": 22,
"end": 23,
"loc": {
"start": {
"line": 1,
- "column": 20
+ "column": 22
},
"end": {
"line": 1,
"column": 23
}
},
- "typeAnnotation": {
- "type": "GenericTypeAnnotation",
+ "typeParameters": null,
+ "id": {
+ "type": "Identifier",
"start": 22,
"end": 23,
"loc": {
@@ -233,81 +234,66 @@
"column": 23
}
},
- "typeParameters": null,
- "id": {
- "type": "Identifier",
- "start": 22,
- "end": 23,
- "loc": {
- "start": {
- "line": 1,
- "column": 22
- },
- "end": {
- "line": 1,
- "column": 23
- }
- },
- "name": "T"
- }
+ "name": "T"
+ }
+ }
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 24,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 26
}
},
- "body": {
- "type": "BlockStatement",
- "start": 24,
- "end": 26,
- "loc": {
- "start": {
- "line": 1,
- "column": 24
- },
- "end": {
- "line": 1,
- "column": 26
- }
+ "body": [],
+ "directives": []
+ },
+ "typeParameters": {
+ "type": "TypeParameterDeclaration",
+ "start": 11,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
},
- "body": []
+ "end": {
+ "line": 1,
+ "column": 14
+ }
},
- "typeParameters": {
- "type": "TypeParameterDeclaration",
- "start": 11,
- "end": 14,
- "loc": {
- "start": {
- "line": 1,
- "column": 11
- },
- "end": {
- "line": 1,
- "column": 14
- }
- },
- "params": [
- {
- "type": "Identifier",
- "start": 12,
- "end": 13,
- "loc": {
- "start": {
- "line": 1,
- "column": 12
- },
- "end": {
- "line": 1,
- "column": 13
- }
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 12,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
},
- "name": "T"
- }
- ]
- }
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "name": "T"
+ }
+ ]
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/26/expected.json b/test/fixtures/flow/type-annotations/26/expected.json
index 6e91455db9..32323b6fb7 100644
--- a/test/fixtures/flow/type-annotations/26/expected.json
+++ b/test/fixtures/flow/type-annotations/26/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 3,
"end": 21,
"loc": {
@@ -106,7 +106,7 @@
"shorthand": false,
"computed": false,
"key": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 3,
"end": 6,
"loc": {
@@ -119,61 +119,64 @@
"column": 6
}
},
- "value": 123,
- "rawValue": 123,
- "raw": "123"
- },
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 9,
- "end": 21,
- "loc": {
- "start": {
- "line": 1,
- "column": 9
- },
- "end": {
- "line": 1,
- "column": 21
- }
+ "extra": {
+ "rawValue": 123,
+ "raw": "123"
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [
- {
- "type": "Identifier",
- "start": 10,
+ "value": 123
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 10,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "x",
+ "typeAnnotation": {
+ "type": "TypeAnnotation",
+ "start": 11,
"end": 14,
"loc": {
"start": {
"line": 1,
- "column": 10
+ "column": 11
},
"end": {
"line": 1,
"column": 14
}
},
- "name": "x",
"typeAnnotation": {
- "type": "TypeAnnotation",
- "start": 11,
+ "type": "GenericTypeAnnotation",
+ "start": 13,
"end": 14,
"loc": {
"start": {
"line": 1,
- "column": 11
+ "column": 13
},
"end": {
"line": 1,
"column": 14
}
},
- "typeAnnotation": {
- "type": "GenericTypeAnnotation",
+ "typeParameters": null,
+ "id": {
+ "type": "Identifier",
"start": 13,
"end": 14,
"loc": {
@@ -186,43 +189,43 @@
"column": 14
}
},
- "typeParameters": null,
- "id": {
- "type": "Identifier",
- "start": 13,
- "end": 14,
- "loc": {
- "start": {
- "line": 1,
- "column": 13
- },
- "end": {
- "line": 1,
- "column": 14
- }
- },
- "name": "T"
- }
+ "name": "T"
}
}
}
- ],
- "returnType": {
- "type": "TypeAnnotation",
- "start": 15,
+ }
+ ],
+ "returnType": {
+ "type": "TypeAnnotation",
+ "start": 15,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "typeAnnotation": {
+ "type": "GenericTypeAnnotation",
+ "start": 17,
"end": 18,
"loc": {
"start": {
"line": 1,
- "column": 15
+ "column": 17
},
"end": {
"line": 1,
"column": 18
}
},
- "typeAnnotation": {
- "type": "GenericTypeAnnotation",
+ "typeParameters": null,
+ "id": {
+ "type": "Identifier",
"start": 17,
"end": 18,
"loc": {
@@ -235,81 +238,66 @@
"column": 18
}
},
- "typeParameters": null,
- "id": {
- "type": "Identifier",
- "start": 17,
- "end": 18,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 18
- }
- },
- "name": "T"
- }
+ "name": "T"
+ }
+ }
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 21
}
},
- "body": {
- "type": "BlockStatement",
- "start": 19,
- "end": 21,
- "loc": {
- "start": {
- "line": 1,
- "column": 19
- },
- "end": {
- "line": 1,
- "column": 21
- }
+ "body": [],
+ "directives": []
+ },
+ "typeParameters": {
+ "type": "TypeParameterDeclaration",
+ "start": 6,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
},
- "body": []
+ "end": {
+ "line": 1,
+ "column": 9
+ }
},
- "typeParameters": {
- "type": "TypeParameterDeclaration",
- "start": 6,
- "end": 9,
- "loc": {
- "start": {
- "line": 1,
- "column": 6
- },
- "end": {
- "line": 1,
- "column": 9
- }
- },
- "params": [
- {
- "type": "Identifier",
- "start": 7,
- "end": 8,
- "loc": {
- "start": {
- "line": 1,
- "column": 7
- },
- "end": {
- "line": 1,
- "column": 8
- }
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
},
- "name": "T"
- }
- ]
- }
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "T"
+ }
+ ]
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/27/expected.json b/test/fixtures/flow/type-annotations/27/expected.json
index 626bfacfe8..71c96e968a 100644
--- a/test/fixtures/flow/type-annotations/27/expected.json
+++ b/test/fixtures/flow/type-annotations/27/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 11,
"end": 38,
"loc": {
@@ -107,94 +107,80 @@
},
"static": false,
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 22,
- "end": 38,
- "loc": {
- "start": {
- "line": 1,
- "column": 22
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 23,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
},
- "end": {
- "line": 1,
- "column": 38
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [
- {
- "type": "Identifier",
- "start": 23,
+ "name": "value",
+ "typeAnnotation": {
+ "type": "TypeAnnotation",
+ "start": 28,
"end": 35,
"loc": {
"start": {
"line": 1,
- "column": 23
+ "column": 28
},
"end": {
"line": 1,
"column": 35
}
},
- "name": "value",
"typeAnnotation": {
- "type": "TypeAnnotation",
- "start": 28,
+ "type": "NumberTypeAnnotation",
+ "start": 29,
"end": 35,
"loc": {
"start": {
"line": 1,
- "column": 28
+ "column": 29
},
"end": {
"line": 1,
"column": 35
}
- },
- "typeAnnotation": {
- "type": "NumberTypeAnnotation",
- "start": 29,
- "end": 35,
- "loc": {
- "start": {
- "line": 1,
- "column": 29
- },
- "end": {
- "line": 1,
- "column": 35
- }
- }
}
}
}
- ],
- "body": {
- "type": "BlockStatement",
- "start": 36,
- "end": 38,
- "loc": {
- "start": {
- "line": 1,
- "column": 36
- },
- "end": {
- "line": 1,
- "column": 38
- }
- },
- "body": []
}
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 36,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/28/expected.json b/test/fixtures/flow/type-annotations/28/expected.json
index fc7065e4ba..ba9b916990 100644
--- a/test/fixtures/flow/type-annotations/28/expected.json
+++ b/test/fixtures/flow/type-annotations/28/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 11,
"end": 43,
"loc": {
@@ -107,124 +107,110 @@
},
"static": false,
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 22,
- "end": 43,
- "loc": {
- "start": {
- "line": 1,
- "column": 22
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 23,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
},
- "end": {
- "line": 1,
- "column": 43
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [
- {
- "type": "Identifier",
- "start": 23,
+ "name": "value",
+ "typeAnnotation": {
+ "type": "TypeAnnotation",
+ "start": 28,
"end": 35,
"loc": {
"start": {
"line": 1,
- "column": 23
+ "column": 28
},
"end": {
"line": 1,
"column": 35
}
},
- "name": "value",
"typeAnnotation": {
- "type": "TypeAnnotation",
- "start": 28,
+ "type": "NumberTypeAnnotation",
+ "start": 29,
"end": 35,
"loc": {
"start": {
"line": 1,
- "column": 28
+ "column": 29
},
"end": {
"line": 1,
"column": 35
}
- },
- "typeAnnotation": {
- "type": "NumberTypeAnnotation",
- "start": 29,
- "end": 35,
- "loc": {
- "start": {
- "line": 1,
- "column": 29
- },
- "end": {
- "line": 1,
- "column": 35
- }
- }
}
}
}
- ],
- "returnType": {
- "type": "TypeAnnotation",
- "start": 36,
+ }
+ ],
+ "returnType": {
+ "type": "TypeAnnotation",
+ "start": 36,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "typeAnnotation": {
+ "type": "VoidTypeAnnotation",
+ "start": 37,
"end": 41,
"loc": {
"start": {
"line": 1,
- "column": 36
+ "column": 37
},
"end": {
"line": 1,
"column": 41
}
- },
- "typeAnnotation": {
- "type": "VoidTypeAnnotation",
- "start": 37,
- "end": 41,
- "loc": {
- "start": {
- "line": 1,
- "column": 37
- },
- "end": {
- "line": 1,
- "column": 41
- }
- }
}
- },
- "body": {
- "type": "BlockStatement",
- "start": 41,
- "end": 43,
- "loc": {
- "start": {
- "line": 1,
- "column": 41
- },
- "end": {
- "line": 1,
- "column": 43
- }
- },
- "body": []
}
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 41,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/29/expected.json b/test/fixtures/flow/type-annotations/29/expected.json
index c778376a2e..b675422aca 100644
--- a/test/fixtures/flow/type-annotations/29/expected.json
+++ b/test/fixtures/flow/type-annotations/29/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 11,
"end": 33,
"loc": {
@@ -107,77 +107,63 @@
},
"static": false,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 22,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [],
+ "returnType": {
+ "type": "TypeAnnotation",
+ "start": 24,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "typeAnnotation": {
+ "type": "NumberTypeAnnotation",
+ "start": 25,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ }
+ }
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 31,
"end": 33,
"loc": {
"start": {
"line": 1,
- "column": 22
+ "column": 31
},
"end": {
"line": 1,
"column": 33
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [],
- "returnType": {
- "type": "TypeAnnotation",
- "start": 24,
- "end": 31,
- "loc": {
- "start": {
- "line": 1,
- "column": 24
- },
- "end": {
- "line": 1,
- "column": 31
- }
- },
- "typeAnnotation": {
- "type": "NumberTypeAnnotation",
- "start": 25,
- "end": 31,
- "loc": {
- "start": {
- "line": 1,
- "column": 25
- },
- "end": {
- "line": 1,
- "column": 31
- }
- }
- }
- },
- "body": {
- "type": "BlockStatement",
- "start": 31,
- "end": 33,
- "loc": {
- "start": {
- "line": 1,
- "column": 31
- },
- "end": {
- "line": 1,
- "column": 33
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/3/expected.json b/test/fixtures/flow/type-annotations/3/expected.json
index 0bd51ba5a6..6c069ca9dd 100644
--- a/test/fixtures/flow/type-annotations/3/expected.json
+++ b/test/fixtures/flow/type-annotations/3/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -169,10 +168,11 @@
"column": 46
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/4/expected.json b/test/fixtures/flow/type-annotations/4/expected.json
index 5af1d4df75..c888bafd92 100644
--- a/test/fixtures/flow/type-annotations/4/expected.json
+++ b/test/fixtures/flow/type-annotations/4/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -139,10 +138,11 @@
"column": 42
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/44/expected.json b/test/fixtures/flow/type-annotations/44/expected.json
index 98db1ba294..ef5ec6c1fb 100644
--- a/test/fixtures/flow/type-annotations/44/expected.json
+++ b/test/fixtures/flow/type-annotations/44/expected.json
@@ -167,7 +167,7 @@
},
"elements": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 23,
"end": 24,
"loc": {
@@ -180,12 +180,14 @@
"column": 24
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
},
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 26,
"end": 27,
"loc": {
@@ -198,12 +200,14 @@
"column": 27
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
},
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 29,
"end": 30,
"loc": {
@@ -216,9 +220,11 @@
"column": 30
}
},
- "value": 3,
- "rawValue": 3,
- "raw": "3"
+ "extra": {
+ "rawValue": 3,
+ "raw": "3"
+ },
+ "value": 3
}
]
}
@@ -226,7 +232,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/5/expected.json b/test/fixtures/flow/type-annotations/5/expected.json
index 7eb48ca8f1..f68cf9d341 100644
--- a/test/fixtures/flow/type-annotations/5/expected.json
+++ b/test/fixtures/flow/type-annotations/5/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -139,10 +138,11 @@
"column": 42
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/50/expected.json b/test/fixtures/flow/type-annotations/50/expected.json
index a30fc23bd0..836b93e825 100644
--- a/test/fixtures/flow/type-annotations/50/expected.json
+++ b/test/fixtures/flow/type-annotations/50/expected.json
@@ -108,7 +108,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 15,
"end": 45,
"loc": {
@@ -140,144 +140,132 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 21,
+ "typeParameters": {
+ "type": "TypeParameterDeclaration",
+ "start": 18,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "U"
+ }
+ ]
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [],
+ "returnType": {
+ "type": "TypeAnnotation",
+ "start": 23,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "typeAnnotation": {
+ "type": "NumberTypeAnnotation",
+ "start": 24,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ }
+ }
+ },
+ "body": {
+ "type": "BlockStatement",
+ "start": 31,
"end": 45,
"loc": {
"start": {
"line": 1,
- "column": 21
+ "column": 31
},
"end": {
"line": 1,
"column": 45
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [],
- "returnType": {
- "type": "TypeAnnotation",
- "start": 23,
- "end": 30,
- "loc": {
- "start": {
- "line": 1,
- "column": 23
- },
- "end": {
- "line": 1,
- "column": 30
- }
- },
- "typeAnnotation": {
- "type": "NumberTypeAnnotation",
- "start": 24,
- "end": 30,
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "start": 33,
+ "end": 43,
"loc": {
"start": {
"line": 1,
- "column": 24
+ "column": 33
},
"end": {
"line": 1,
- "column": 30
+ "column": 43
}
- }
- }
- },
- "body": {
- "type": "BlockStatement",
- "start": 31,
- "end": 45,
- "loc": {
- "start": {
- "line": 1,
- "column": 31
},
- "end": {
- "line": 1,
- "column": 45
- }
- },
- "body": [
- {
- "type": "ReturnStatement",
- "start": 33,
- "end": 43,
+ "argument": {
+ "type": "NumberLiteral",
+ "start": 40,
+ "end": 42,
"loc": {
"start": {
"line": 1,
- "column": 33
+ "column": 40
},
"end": {
"line": 1,
- "column": 43
+ "column": 42
}
},
- "argument": {
- "type": "Literal",
- "start": 40,
- "end": 42,
- "loc": {
- "start": {
- "line": 1,
- "column": 40
- },
- "end": {
- "line": 1,
- "column": 42
- }
- },
- "value": 42,
+ "extra": {
"rawValue": 42,
"raw": "42"
- }
- }
- ]
- },
- "typeParameters": {
- "type": "TypeParameterDeclaration",
- "start": 18,
- "end": 21,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 21
- }
- },
- "params": [
- {
- "type": "Identifier",
- "start": 19,
- "end": 20,
- "loc": {
- "start": {
- "line": 1,
- "column": 19
- },
- "end": {
- "line": 1,
- "column": 20
- }
},
- "name": "U"
+ "value": 42
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/51/expected.json b/test/fixtures/flow/type-annotations/51/expected.json
index efaa54f891..225c2d3596 100644
--- a/test/fixtures/flow/type-annotations/51/expected.json
+++ b/test/fixtures/flow/type-annotations/51/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 12,
"end": 26,
"loc": {
@@ -90,7 +90,7 @@
},
"computed": false,
"key": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 12,
"end": 17,
"loc": {
@@ -103,86 +103,74 @@
"column": 17
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 20,
+ "typeParameters": {
+ "type": "TypeParameterDeclaration",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "T"
+ }
+ ]
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
"end": 26,
"loc": {
"start": {
"line": 1,
- "column": 20
+ "column": 23
},
"end": {
"line": 1,
"column": 26
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 23,
- "end": 26,
- "loc": {
- "start": {
- "line": 1,
- "column": 23
- },
- "end": {
- "line": 1,
- "column": 26
- }
- },
- "body": []
- },
- "typeParameters": {
- "type": "TypeParameterDeclaration",
- "start": 17,
- "end": 20,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 20
- }
- },
- "params": [
- {
- "type": "Identifier",
- "start": 18,
- "end": 19,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 19
- }
- },
- "name": "T"
- }
- ]
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/52/expected.json b/test/fixtures/flow/type-annotations/52/expected.json
index 5f58317a00..6a7b1c6f37 100644
--- a/test/fixtures/flow/type-annotations/52/expected.json
+++ b/test/fixtures/flow/type-annotations/52/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -110,10 +109,11 @@
"column": 41
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/55/expected.json b/test/fixtures/flow/type-annotations/55/expected.json
index ba55a107da..739d25f879 100644
--- a/test/fixtures/flow/type-annotations/55/expected.json
+++ b/test/fixtures/flow/type-annotations/55/expected.json
@@ -136,7 +136,7 @@
}
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 26,
"end": 27,
"loc": {
@@ -149,15 +149,17 @@
"column": 27
}
},
- "value": 4,
- "rawValue": 4,
- "raw": "4"
+ "extra": {
+ "rawValue": 4,
+ "raw": "4"
+ },
+ "value": 4
}
}
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/56/expected.json b/test/fixtures/flow/type-annotations/56/expected.json
index cb00fe285f..91bd2b0584 100644
--- a/test/fixtures/flow/type-annotations/56/expected.json
+++ b/test/fixtures/flow/type-annotations/56/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 14,
"end": 46,
"loc": {
@@ -107,126 +107,112 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 20,
- "end": 46,
- "loc": {
- "start": {
- "line": 1,
- "column": 20
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 21,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
},
- "end": {
- "line": 1,
- "column": 46
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "async": false,
- "params": [
- {
- "type": "Identifier",
- "start": 21,
+ "name": "items",
+ "typeAnnotation": {
+ "type": "TypeAnnotation",
+ "start": 26,
"end": 42,
"loc": {
"start": {
"line": 1,
- "column": 21
+ "column": 26
},
"end": {
"line": 1,
"column": 42
}
},
- "name": "items",
"typeAnnotation": {
- "type": "TypeAnnotation",
- "start": 26,
+ "type": "UnionTypeAnnotation",
+ "start": 27,
"end": 42,
"loc": {
"start": {
"line": 1,
- "column": 26
+ "column": 27
},
"end": {
"line": 1,
"column": 42
}
},
- "typeAnnotation": {
- "type": "UnionTypeAnnotation",
- "start": 27,
- "end": 42,
- "loc": {
- "start": {
- "line": 1,
- "column": 27
- },
- "end": {
- "line": 1,
- "column": 42
+ "types": [
+ {
+ "type": "NumberTypeAnnotation",
+ "start": 27,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
}
},
- "types": [
- {
- "type": "NumberTypeAnnotation",
- "start": 27,
- "end": 33,
- "loc": {
- "start": {
- "line": 1,
- "column": 27
- },
- "end": {
- "line": 1,
- "column": 33
- }
- }
- },
- {
- "type": "StringTypeAnnotation",
- "start": 36,
- "end": 42,
- "loc": {
- "start": {
- "line": 1,
- "column": 36
- },
- "end": {
- "line": 1,
- "column": 42
- }
+ {
+ "type": "StringTypeAnnotation",
+ "start": 36,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 36
+ },
+ "end": {
+ "line": 1,
+ "column": 42
}
}
- ]
- }
+ }
+ ]
}
}
- ],
- "body": {
- "type": "BlockStatement",
- "start": 44,
- "end": 46,
- "loc": {
- "start": {
- "line": 1,
- "column": 44
- },
- "end": {
- "line": 1,
- "column": 46
- }
- },
- "body": []
}
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 44,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 44
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/6/expected.json b/test/fixtures/flow/type-annotations/6/expected.json
index d4ddc1ff2d..9cfdcd0139 100644
--- a/test/fixtures/flow/type-annotations/6/expected.json
+++ b/test/fixtures/flow/type-annotations/6/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -138,10 +137,11 @@
"column": 36
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/60/expected.json b/test/fixtures/flow/type-annotations/60/expected.json
index 4a4f09bb41..a2db556539 100644
--- a/test/fixtures/flow/type-annotations/60/expected.json
+++ b/test/fixtures/flow/type-annotations/60/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 6,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 5,
@@ -222,7 +221,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 27,
"end": 37,
"loc": {
@@ -255,7 +254,7 @@
"name": "x"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 30,
"end": 37,
"loc": {
@@ -268,11 +267,12 @@
"column": 37
}
},
- "value": "hello",
- "rawValue": "hello",
- "raw": "\"hello\""
- },
- "kind": "init"
+ "extra": {
+ "rawValue": "hello",
+ "raw": "\"hello\""
+ },
+ "value": "hello"
+ }
}
]
}
@@ -280,7 +280,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/61/expected.json b/test/fixtures/flow/type-annotations/61/expected.json
index da30aa7d42..b4cdb54e7d 100644
--- a/test/fixtures/flow/type-annotations/61/expected.json
+++ b/test/fixtures/flow/type-annotations/61/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 6,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 5,
@@ -222,7 +221,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 26,
"end": 36,
"loc": {
@@ -255,7 +254,7 @@
"name": "x"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 29,
"end": 36,
"loc": {
@@ -268,11 +267,12 @@
"column": 36
}
},
- "value": "hello",
- "rawValue": "hello",
- "raw": "\"hello\""
- },
- "kind": "init"
+ "extra": {
+ "rawValue": "hello",
+ "raw": "\"hello\""
+ },
+ "value": "hello"
+ }
}
]
}
@@ -280,7 +280,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/62/expected.json b/test/fixtures/flow/type-annotations/62/expected.json
index bb2b505c32..7201193e8a 100644
--- a/test/fixtures/flow/type-annotations/62/expected.json
+++ b/test/fixtures/flow/type-annotations/62/expected.json
@@ -184,7 +184,7 @@
},
"elements": [
{
- "type": "Literal",
+ "type": "StringLiteral",
"start": 27,
"end": 34,
"loc": {
@@ -197,9 +197,11 @@
"column": 34
}
},
- "value": "hello",
- "rawValue": "hello",
- "raw": "\"hello\""
+ "extra": {
+ "rawValue": "hello",
+ "raw": "\"hello\""
+ },
+ "value": "hello"
}
]
}
@@ -207,7 +209,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/63/expected.json b/test/fixtures/flow/type-annotations/63/expected.json
index d6686b4b73..55cd213628 100644
--- a/test/fixtures/flow/type-annotations/63/expected.json
+++ b/test/fixtures/flow/type-annotations/63/expected.json
@@ -78,7 +78,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 14,
"end": 15,
"loc": {
@@ -110,7 +110,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 14,
@@ -226,10 +225,11 @@
"column": 36
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/64/expected.json b/test/fixtures/flow/type-annotations/64/expected.json
index ff6128153f..8c9d19d6c2 100644
--- a/test/fixtures/flow/type-annotations/64/expected.json
+++ b/test/fixtures/flow/type-annotations/64/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "ArrayPattern",
@@ -188,10 +187,11 @@
"column": 35
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/65/expected.json b/test/fixtures/flow/type-annotations/65/expected.json
index d5077fb333..17d3f9e5c0 100644
--- a/test/fixtures/flow/type-annotations/65/expected.json
+++ b/test/fixtures/flow/type-annotations/65/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "RestElement",
@@ -186,10 +185,11 @@
"column": 39
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/66/expected.json b/test/fixtures/flow/type-annotations/66/expected.json
index d684d49b74..33bccbd102 100644
--- a/test/fixtures/flow/type-annotations/66/expected.json
+++ b/test/fixtures/flow/type-annotations/66/expected.json
@@ -59,7 +59,6 @@
"id": null,
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "RestElement",
@@ -185,12 +184,15 @@
"column": 37
}
},
- "body": []
+ "body": [],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/67/expected.json b/test/fixtures/flow/type-annotations/67/expected.json
index a95af4382b..29c7ecb1b2 100644
--- a/test/fixtures/flow/type-annotations/67/expected.json
+++ b/test/fixtures/flow/type-annotations/67/expected.json
@@ -120,7 +120,6 @@
"id": null,
"generator": false,
"expression": true,
- "async": false,
"params": [],
"body": {
"type": "Identifier",
@@ -143,7 +142,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/68/expected.json b/test/fixtures/flow/type-annotations/68/expected.json
index 7e864bb663..0947eeb733 100644
--- a/test/fixtures/flow/type-annotations/68/expected.json
+++ b/test/fixtures/flow/type-annotations/68/expected.json
@@ -90,7 +90,6 @@
"id": null,
"generator": false,
"expression": true,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -107,7 +106,9 @@
}
},
"name": "bar",
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
],
"body": {
@@ -161,7 +162,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/7/expected.json b/test/fixtures/flow/type-annotations/7/expected.json
index 3d3f13417e..6a7ceea68d 100644
--- a/test/fixtures/flow/type-annotations/7/expected.json
+++ b/test/fixtures/flow/type-annotations/7/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -141,10 +140,11 @@
"column": 36
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/72/expected.json b/test/fixtures/flow/type-annotations/72/expected.json
index bab73a4f10..f6ceb4484c 100644
--- a/test/fixtures/flow/type-annotations/72/expected.json
+++ b/test/fixtures/flow/type-annotations/72/expected.json
@@ -120,7 +120,6 @@
"id": null,
"generator": false,
"expression": true,
- "async": false,
"params": [],
"body": {
"type": "Identifier",
@@ -138,13 +137,15 @@
},
"name": "bar"
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/73/expected.json b/test/fixtures/flow/type-annotations/73/expected.json
index 09068edec7..a14ef97682 100644
--- a/test/fixtures/flow/type-annotations/73/expected.json
+++ b/test/fixtures/flow/type-annotations/73/expected.json
@@ -90,7 +90,6 @@
"id": null,
"generator": false,
"expression": true,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -107,7 +106,9 @@
}
},
"name": "bar",
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
],
"body": {
@@ -156,13 +157,15 @@
}
}
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/74/expected.json b/test/fixtures/flow/type-annotations/74/expected.json
index 5583d9416d..c22c079ced 100644
--- a/test/fixtures/flow/type-annotations/74/expected.json
+++ b/test/fixtures/flow/type-annotations/74/expected.json
@@ -104,7 +104,6 @@
"id": null,
"generator": false,
"expression": true,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -121,7 +120,9 @@
}
},
"name": "bar",
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
],
"body": {
@@ -170,7 +171,9 @@
}
}
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
},
"typeAnnotation": {
"type": "TypeAnnotation",
@@ -202,13 +205,15 @@
}
}
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/78/expected.json b/test/fixtures/flow/type-annotations/78/expected.json
index 27a670dddc..eec39a30b0 100644
--- a/test/fixtures/flow/type-annotations/78/expected.json
+++ b/test/fixtures/flow/type-annotations/78/expected.json
@@ -118,7 +118,9 @@
}
},
"name": "foo",
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
},
"alternate": {
"type": "Identifier",
@@ -141,7 +143,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/79/expected.json b/test/fixtures/flow/type-annotations/79/expected.json
index 31d7654fb3..30439bfe89 100644
--- a/test/fixtures/flow/type-annotations/79/expected.json
+++ b/test/fixtures/flow/type-annotations/79/expected.json
@@ -120,7 +120,6 @@
"id": null,
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -137,7 +136,9 @@
}
},
"name": "foo",
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
],
"body": {
@@ -154,7 +155,8 @@
"column": 36
}
},
- "body": []
+ "body": [],
+ "directives": []
},
"returnType": {
"type": "TypeAnnotation",
@@ -208,7 +210,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/8/expected.json b/test/fixtures/flow/type-annotations/8/expected.json
index e0be8e9149..55750a0092 100644
--- a/test/fixtures/flow/type-annotations/8/expected.json
+++ b/test/fixtures/flow/type-annotations/8/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -141,10 +140,11 @@
"column": 38
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/80/expected.json b/test/fixtures/flow/type-annotations/80/expected.json
index c1029e52d9..35d21db92f 100644
--- a/test/fixtures/flow/type-annotations/80/expected.json
+++ b/test/fixtures/flow/type-annotations/80/expected.json
@@ -59,7 +59,6 @@
"id": null,
"generator": false,
"expression": true,
- "async": false,
"params": [
{
"type": "RestElement",
@@ -187,10 +186,12 @@
},
"name": "rest"
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/89/expected.json b/test/fixtures/flow/type-annotations/89/expected.json
index 6e9f5fb118..fafb7c0a97 100644
--- a/test/fixtures/flow/type-annotations/89/expected.json
+++ b/test/fixtures/flow/type-annotations/89/expected.json
@@ -77,7 +77,7 @@
],
"importKind": "type",
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 21,
"end": 26,
"loc": {
@@ -90,12 +90,14 @@
"column": 26
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/9/expected.json b/test/fixtures/flow/type-annotations/9/expected.json
index 248c8fd763..d2393788e5 100644
--- a/test/fixtures/flow/type-annotations/9/expected.json
+++ b/test/fixtures/flow/type-annotations/9/expected.json
@@ -60,7 +60,6 @@
},
"generator": false,
"expression": false,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -189,10 +188,11 @@
"column": 44
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/90/expected.json b/test/fixtures/flow/type-annotations/90/expected.json
index 6a3d90e3fc..d18d05b185 100644
--- a/test/fixtures/flow/type-annotations/90/expected.json
+++ b/test/fixtures/flow/type-annotations/90/expected.json
@@ -77,7 +77,7 @@
],
"importKind": "typeof",
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 23,
"end": 28,
"loc": {
@@ -90,12 +90,14 @@
"column": 28
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/91/expected.json b/test/fixtures/flow/type-annotations/91/expected.json
index c89dc1f3e2..508d8b7fd6 100644
--- a/test/fixtures/flow/type-annotations/91/expected.json
+++ b/test/fixtures/flow/type-annotations/91/expected.json
@@ -140,7 +140,7 @@
],
"importKind": "type",
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 28,
"end": 33,
"loc": {
@@ -153,12 +153,14 @@
"column": 33
}
},
- "value": "baz",
- "rawValue": "baz",
- "raw": "\"baz\""
+ "extra": {
+ "rawValue": "baz",
+ "raw": "\"baz\""
+ },
+ "value": "baz"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/92/expected.json b/test/fixtures/flow/type-annotations/92/expected.json
index bc7f70f9d0..3bf07813d5 100644
--- a/test/fixtures/flow/type-annotations/92/expected.json
+++ b/test/fixtures/flow/type-annotations/92/expected.json
@@ -93,7 +93,7 @@
],
"importKind": "typeof",
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 32,
"end": 37,
"loc": {
@@ -106,12 +106,14 @@
"column": 37
}
},
- "value": "baz",
- "rawValue": "baz",
- "raw": "\"baz\""
+ "extra": {
+ "rawValue": "baz",
+ "raw": "\"baz\""
+ },
+ "value": "baz"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/93/expected.json b/test/fixtures/flow/type-annotations/93/expected.json
index ea96875cff..588d644b5a 100644
--- a/test/fixtures/flow/type-annotations/93/expected.json
+++ b/test/fixtures/flow/type-annotations/93/expected.json
@@ -77,7 +77,7 @@
],
"importKind": "value",
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 17,
"end": 22,
"loc": {
@@ -90,12 +90,14 @@
"column": 22
}
},
- "value": "foo",
- "rawValue": "foo",
- "raw": "\"foo\""
+ "extra": {
+ "rawValue": "foo",
+ "raw": "\"foo\""
+ },
+ "value": "foo"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/94/expected.json b/test/fixtures/flow/type-annotations/94/expected.json
index 68d7ec00e2..71f88f5ecd 100644
--- a/test/fixtures/flow/type-annotations/94/expected.json
+++ b/test/fixtures/flow/type-annotations/94/expected.json
@@ -124,7 +124,7 @@
],
"importKind": "value",
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 24,
"end": 29,
"loc": {
@@ -137,12 +137,14 @@
"column": 29
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/95/expected.json b/test/fixtures/flow/type-annotations/95/expected.json
index ded0af06a1..d90a424b63 100644
--- a/test/fixtures/flow/type-annotations/95/expected.json
+++ b/test/fixtures/flow/type-annotations/95/expected.json
@@ -77,7 +77,7 @@
],
"importKind": "type",
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 32,
"end": 37,
"loc": {
@@ -90,12 +90,14 @@
"column": 37
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/96/expected.json b/test/fixtures/flow/type-annotations/96/expected.json
index c1262eb5ba..11ed46da39 100644
--- a/test/fixtures/flow/type-annotations/96/expected.json
+++ b/test/fixtures/flow/type-annotations/96/expected.json
@@ -77,7 +77,7 @@
],
"importKind": "typeof",
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 34,
"end": 39,
"loc": {
@@ -90,12 +90,14 @@
"column": 39
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-annotations/97/expected.json b/test/fixtures/flow/type-annotations/97/expected.json
index e23eb4353e..b6a11dc752 100644
--- a/test/fixtures/flow/type-annotations/97/expected.json
+++ b/test/fixtures/flow/type-annotations/97/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 2,
"end": 22,
"loc": {
@@ -156,15 +156,18 @@
"column": 22
}
},
- "body": []
+ "body": [],
+ "directives": []
}
- },
- "kind": "init"
+ }
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/flow/type-exports/specifier-from/expected.json b/test/fixtures/flow/type-exports/specifier-from/expected.json
index b0ed4559fe..583326b8a1 100644
--- a/test/fixtures/flow/type-exports/specifier-from/expected.json
+++ b/test/fixtures/flow/type-exports/specifier-from/expected.json
@@ -42,7 +42,6 @@
"column": 34
}
},
- "exportKind": "type",
"specifiers": [
{
"type": "ExportSpecifier",
@@ -93,7 +92,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 25,
"end": 33,
"loc": {
@@ -106,12 +105,16 @@
"column": 33
}
},
- "value": "foobar",
- "rawValue": "foobar",
- "raw": "\"foobar\""
+ "extra": {
+ "rawValue": "foobar",
+ "raw": "\"foobar\""
+ },
+ "value": "foobar"
},
+ "exportKind": "type",
"declaration": null
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/flow/typecasts/1/expected.json b/test/fixtures/flow/typecasts/1/expected.json
index 85939fde85..87ffc46fab 100644
--- a/test/fixtures/flow/typecasts/1/expected.json
+++ b/test/fixtures/flow/typecasts/1/expected.json
@@ -102,10 +102,12 @@
}
}
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/typecasts/2/expected.json b/test/fixtures/flow/typecasts/2/expected.json
index b703a717b9..79b652ae59 100644
--- a/test/fixtures/flow/typecasts/2/expected.json
+++ b/test/fixtures/flow/typecasts/2/expected.json
@@ -72,7 +72,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 2,
"end": 8,
"loc": {
@@ -105,7 +105,7 @@
"name": "xxx"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 7,
"end": 8,
"loc": {
@@ -118,14 +118,15 @@
"column": 8
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 10,
"end": 20,
"loc": {
@@ -158,7 +159,7 @@
"name": "yyy"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 15,
"end": 20,
"loc": {
@@ -171,11 +172,12 @@
"column": 20
}
},
- "value": "hey",
- "rawValue": "hey",
- "raw": "\"hey\""
- },
- "kind": "init"
+ "extra": {
+ "rawValue": "hey",
+ "raw": "\"hey\""
+ },
+ "value": "hey"
+ }
}
]
},
@@ -307,10 +309,12 @@
"indexers": []
}
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/typecasts/3/expected.json b/test/fixtures/flow/typecasts/3/expected.json
index 6a5173baa1..13303dc1d3 100644
--- a/test/fixtures/flow/typecasts/3/expected.json
+++ b/test/fixtures/flow/typecasts/3/expected.json
@@ -73,7 +73,6 @@
"id": null,
"generator": false,
"expression": true,
- "async": false,
"params": [
{
"type": "Identifier",
@@ -124,7 +123,7 @@
},
"operator": "+",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 16,
"end": 17,
"loc": {
@@ -137,9 +136,11 @@
"column": 17
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
},
@@ -239,10 +240,12 @@
"typeParameters": null
}
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/flow/typecasts/4/expected.json b/test/fixtures/flow/typecasts/4/expected.json
index 2fd24c6b1d..3fab1290ea 100644
--- a/test/fixtures/flow/typecasts/4/expected.json
+++ b/test/fixtures/flow/typecasts/4/expected.json
@@ -117,7 +117,9 @@
}
}
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
},
{
"type": "TypeCastExpression",
@@ -179,13 +181,17 @@
}
}
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/arrow-functions/inner-parens/actual.js b/test/fixtures/harmony/arrow-functions/inner-parens/actual.js
new file mode 100644
index 0000000000..9f3d7cb5de
--- /dev/null
+++ b/test/fixtures/harmony/arrow-functions/inner-parens/actual.js
@@ -0,0 +1 @@
+var foo = ((foo)) => {};
diff --git a/test/fixtures/harmony/arrow-functions/inner-parens/options.json b/test/fixtures/harmony/arrow-functions/inner-parens/options.json
new file mode 100644
index 0000000000..cb6c66081e
--- /dev/null
+++ b/test/fixtures/harmony/arrow-functions/inner-parens/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:11)"
+}
diff --git a/test/fixtures/harmony/computed-properties/call-expression/expected.json b/test/fixtures/harmony/computed-properties/call-expression/expected.json
index df5fedc3b7..6a6f627eec 100644
--- a/test/fixtures/harmony/computed-properties/call-expression/expected.json
+++ b/test/fixtures/harmony/computed-properties/call-expression/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 14,
"end": 25,
"loc": {
@@ -138,7 +138,7 @@
"arguments": []
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 23,
"end": 25,
"loc": {
@@ -151,11 +151,12 @@
"column": 13
}
},
- "value": "",
- "rawValue": "",
- "raw": "\"\""
- },
- "kind": "init"
+ "extra": {
+ "rawValue": "",
+ "raw": "\"\""
+ },
+ "value": ""
+ }
}
]
}
@@ -163,7 +164,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/actual.js b/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/actual.js
new file mode 100644
index 0000000000..1f9bc179c3
--- /dev/null
+++ b/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/actual.js
@@ -0,0 +1,2 @@
+export default function () {}
+(foo);
diff --git a/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/expected.json b/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/expected.json
new file mode 100644
index 0000000000..499e822973
--- /dev/null
+++ b/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/expected.json
@@ -0,0 +1,119 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "declaration": {
+ "type": "FunctionDeclaration",
+ "start": 15,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 30,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "name": "foo",
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/modules/export-default-function-expression/expected.json b/test/fixtures/harmony/modules/export-default-function-expression/expected.json
index b518031244..a83ccafb0b 100644
--- a/test/fixtures/harmony/modules/export-default-function-expression/expected.json
+++ b/test/fixtures/harmony/modules/export-default-function-expression/expected.json
@@ -89,11 +89,15 @@
"column": 31
}
},
- "body": []
+ "body": [],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/modules/options.json b/test/fixtures/harmony/modules/options.json
new file mode 100644
index 0000000000..2104ca4328
--- /dev/null
+++ b/test/fixtures/harmony/modules/options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/harmony/uncategorised/191/actual.js b/test/fixtures/harmony/uncategorised/.191/actual.js
similarity index 100%
rename from test/fixtures/harmony/uncategorised/191/actual.js
rename to test/fixtures/harmony/uncategorised/.191/actual.js
diff --git a/test/fixtures/harmony/uncategorised/191/expected.json b/test/fixtures/harmony/uncategorised/.191/expected.json
similarity index 100%
rename from test/fixtures/harmony/uncategorised/191/expected.json
rename to test/fixtures/harmony/uncategorised/.191/expected.json
diff --git a/test/fixtures/harmony/uncategorised/260/actual.js b/test/fixtures/harmony/uncategorised/.260/actual.js
similarity index 100%
rename from test/fixtures/harmony/uncategorised/260/actual.js
rename to test/fixtures/harmony/uncategorised/.260/actual.js
diff --git a/test/fixtures/harmony/uncategorised/260/options.json b/test/fixtures/harmony/uncategorised/.260/options.json
similarity index 100%
rename from test/fixtures/harmony/uncategorised/260/options.json
rename to test/fixtures/harmony/uncategorised/.260/options.json
diff --git a/test/fixtures/harmony/uncategorised/335/actual.js b/test/fixtures/harmony/uncategorised/.335/actual.js
similarity index 100%
rename from test/fixtures/harmony/uncategorised/335/actual.js
rename to test/fixtures/harmony/uncategorised/.335/actual.js
diff --git a/test/fixtures/harmony/uncategorised/.335/expected.json b/test/fixtures/harmony/uncategorised/.335/expected.json
new file mode 100644
index 0000000000..5e726736c7
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/.335/expected.json
@@ -0,0 +1,152 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "y"
+ },
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "ObjectPattern",
+ "start": 12,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 13,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "yield"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "yield"
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "body": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/335/options.json b/test/fixtures/harmony/uncategorised/.335/options.json
similarity index 100%
rename from test/fixtures/harmony/uncategorised/335/options.json
rename to test/fixtures/harmony/uncategorised/.335/options.json
diff --git a/test/fixtures/harmony/uncategorised/343/actual.js b/test/fixtures/harmony/uncategorised/.343/actual.js
similarity index 100%
rename from test/fixtures/harmony/uncategorised/343/actual.js
rename to test/fixtures/harmony/uncategorised/.343/actual.js
diff --git a/test/fixtures/harmony/uncategorised/.343/expected.json b/test/fixtures/harmony/uncategorised/.343/expected.json
new file mode 100644
index 0000000000..dd64dc845d
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/.343/expected.json
@@ -0,0 +1,68 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "raw": "/\\u{110000}/u",
+ "regex": {
+ "pattern": "\\u{110000}",
+ "flags": "u"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/343/options.json b/test/fixtures/harmony/uncategorised/.343/options.json
similarity index 100%
rename from test/fixtures/harmony/uncategorised/343/options.json
rename to test/fixtures/harmony/uncategorised/.343/options.json
diff --git a/test/fixtures/harmony/uncategorised/345/actual.js b/test/fixtures/harmony/uncategorised/.345/actual.js
similarity index 100%
rename from test/fixtures/harmony/uncategorised/345/actual.js
rename to test/fixtures/harmony/uncategorised/.345/actual.js
diff --git a/test/fixtures/harmony/uncategorised/345/options.json b/test/fixtures/harmony/uncategorised/.345/options.json
similarity index 100%
rename from test/fixtures/harmony/uncategorised/345/options.json
rename to test/fixtures/harmony/uncategorised/.345/options.json
diff --git a/test/fixtures/harmony/uncategorised/346/actual.js b/test/fixtures/harmony/uncategorised/.346/actual.js
similarity index 100%
rename from test/fixtures/harmony/uncategorised/346/actual.js
rename to test/fixtures/harmony/uncategorised/.346/actual.js
diff --git a/test/fixtures/harmony/uncategorised/346/options.json b/test/fixtures/harmony/uncategorised/.346/options.json
similarity index 100%
rename from test/fixtures/harmony/uncategorised/346/options.json
rename to test/fixtures/harmony/uncategorised/.346/options.json
diff --git a/test/fixtures/harmony/uncategorised/348/actual.js b/test/fixtures/harmony/uncategorised/.348/actual.js
similarity index 100%
rename from test/fixtures/harmony/uncategorised/348/actual.js
rename to test/fixtures/harmony/uncategorised/.348/actual.js
diff --git a/test/fixtures/harmony/uncategorised/.348/expected.json b/test/fixtures/harmony/uncategorised/.348/expected.json
new file mode 100644
index 0000000000..a90d6d7108
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/.348/expected.json
@@ -0,0 +1,177 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 3,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 17,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 28,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "extra": {
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "value": 2
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/348/options.json b/test/fixtures/harmony/uncategorised/.348/options.json
similarity index 100%
rename from test/fixtures/harmony/uncategorised/348/options.json
rename to test/fixtures/harmony/uncategorised/.348/options.json
diff --git a/test/fixtures/harmony/uncategorised/349/actual.js b/test/fixtures/harmony/uncategorised/.349/actual.js
similarity index 100%
rename from test/fixtures/harmony/uncategorised/349/actual.js
rename to test/fixtures/harmony/uncategorised/.349/actual.js
diff --git a/test/fixtures/harmony/uncategorised/.349/expected.json b/test/fixtures/harmony/uncategorised/.349/expected.json
new file mode 100644
index 0000000000..0ea21db861
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/.349/expected.json
@@ -0,0 +1,174 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "StringLiteral",
+ "start": 3,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "value": "__proto__",
+ "rawValue": "__proto__",
+ "raw": "'__proto__'"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "value": 1,
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 19,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "name": "__proto__"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": 2,
+ "rawValue": 2,
+ "raw": "2"
+ },
+ "kind": "init"
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/349/options.json b/test/fixtures/harmony/uncategorised/.349/options.json
similarity index 100%
rename from test/fixtures/harmony/uncategorised/349/options.json
rename to test/fixtures/harmony/uncategorised/.349/options.json
diff --git a/test/fixtures/harmony/uncategorised/353/actual.js b/test/fixtures/harmony/uncategorised/.353/actual.js
similarity index 100%
rename from test/fixtures/harmony/uncategorised/353/actual.js
rename to test/fixtures/harmony/uncategorised/.353/actual.js
diff --git a/test/fixtures/harmony/uncategorised/353/expected.json b/test/fixtures/harmony/uncategorised/.353/expected.json
similarity index 100%
rename from test/fixtures/harmony/uncategorised/353/expected.json
rename to test/fixtures/harmony/uncategorised/.353/expected.json
diff --git a/test/fixtures/harmony/uncategorised/.353/options.json b/test/fixtures/harmony/uncategorised/.353/options.json
new file mode 100644
index 0000000000..a8b5ad2f5b
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/.353/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Redefinition of __proto__ property (1:14)"
+}
diff --git a/test/fixtures/harmony/uncategorised/1/expected.json b/test/fixtures/harmony/uncategorised/1/expected.json
index a9ae440c03..da720c7122 100644
--- a/test/fixtures/harmony/uncategorised/1/expected.json
+++ b/test/fixtures/harmony/uncategorised/1/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 18,
"loc": {
@@ -42,8 +43,8 @@
"column": 18
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 18,
"loc": {
@@ -56,12 +57,13 @@
"column": 18
}
},
- "value": "煎茶",
- "rawValue": "煎茶",
- "raw": "\"\\u{714E}\\u{8336}\""
+ "value": "\\u{714E}\\u{8336}",
+ "extra": {
+ "raw": "\"\\u{714E}\\u{8336}\"",
+ "rawValue": "\\u{714E}\\u{8336}"
+ }
}
}
]
- },
- "comments": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/10/expected.json b/test/fixtures/harmony/uncategorised/10/expected.json
index cf7579fc2b..742740cf25 100644
--- a/test/fixtures/harmony/uncategorised/10/expected.json
+++ b/test/fixtures/harmony/uncategorised/10/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,12 +56,14 @@
"column": 3
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "0O2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "0O2"
+ },
+ "value": 2
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/100/expected.json b/test/fixtures/harmony/uncategorised/100/expected.json
index 666ce9a5b4..6cf9d34539 100644
--- a/test/fixtures/harmony/uncategorised/100/expected.json
+++ b/test/fixtures/harmony/uncategorised/100/expected.json
@@ -138,12 +138,15 @@
"name": "v"
}
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/101/expected.json b/test/fixtures/harmony/uncategorised/101/expected.json
index 2567fa978a..474fa746b1 100644
--- a/test/fixtures/harmony/uncategorised/101/expected.json
+++ b/test/fixtures/harmony/uncategorised/101/expected.json
@@ -122,12 +122,15 @@
}
}
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/103/expected.json b/test/fixtures/harmony/uncategorised/103/expected.json
index 609ce0d37a..1397cc5c38 100644
--- a/test/fixtures/harmony/uncategorised/103/expected.json
+++ b/test/fixtures/harmony/uncategorised/103/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 10,
"end": 31,
"loc": {
@@ -121,42 +121,42 @@
},
"name": "test"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 16,
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
"end": 31,
"loc": {
"start": {
"line": 1,
- "column": 16
+ "column": 19
},
"end": {
"line": 1,
"column": 31
}
},
- "id": null,
- "generator": true,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 19,
- "end": 31,
- "loc": {
- "start": {
- "line": 1,
- "column": 19
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 21,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
},
- "end": {
- "line": 1,
- "column": 31
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "YieldExpression",
"start": 21,
"end": 29,
"loc": {
@@ -169,41 +169,27 @@
"column": 29
}
},
- "expression": {
- "type": "YieldExpression",
- "start": 21,
+ "delegate": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 28,
"end": 29,
"loc": {
"start": {
"line": 1,
- "column": 21
+ "column": 28
},
"end": {
"line": 1,
"column": 29
}
},
- "delegate": true,
- "argument": {
- "type": "Identifier",
- "start": 28,
- "end": 29,
- "loc": {
- "start": {
- "line": 1,
- "column": 28
- },
- "end": {
- "line": 1,
- "column": 29
- }
- },
- "name": "v"
- }
+ "name": "v"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
@@ -212,7 +198,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/106/expected.json b/test/fixtures/harmony/uncategorised/106/expected.json
index 2bbbe1257e..f5ac697314 100644
--- a/test/fixtures/harmony/uncategorised/106/expected.json
+++ b/test/fixtures/harmony/uncategorised/106/expected.json
@@ -120,7 +120,7 @@
},
"delegate": false,
"argument": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 28,
"end": 30,
"loc": {
@@ -133,19 +133,24 @@
"column": 30
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
}
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/109/options.json b/test/fixtures/harmony/uncategorised/109/options.json
new file mode 100644
index 0000000000..4c07f39d17
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/109/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:16)"
+}
diff --git a/test/fixtures/harmony/uncategorised/11/expected.json b/test/fixtures/harmony/uncategorised/11/expected.json
index a6833d9df8..360fcb62c6 100644
--- a/test/fixtures/harmony/uncategorised/11/expected.json
+++ b/test/fixtures/harmony/uncategorised/11/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -56,12 +56,14 @@
"column": 4
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "0O12"
+ "extra": {
+ "rawValue": 10,
+ "raw": "0O12"
+ },
+ "value": 10
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/113/expected.json b/test/fixtures/harmony/uncategorised/113/expected.json
index 937612426b..d5b033e029 100644
--- a/test/fixtures/harmony/uncategorised/113/expected.json
+++ b/test/fixtures/harmony/uncategorised/113/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 9,
"end": 17,
"loc": {
@@ -107,46 +107,32 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 12,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 15,
"end": 17,
"loc": {
"start": {
"line": 1,
- "column": 12
+ "column": 15
},
"end": {
"line": 1,
"column": 17
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 15,
- "end": 17,
- "loc": {
- "start": {
- "line": 1,
- "column": 15
- },
- "end": {
- "line": 1,
- "column": 17
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/114/expected.json b/test/fixtures/harmony/uncategorised/114/expected.json
index 2161c2d0ee..6601d59d6d 100644
--- a/test/fixtures/harmony/uncategorised/114/expected.json
+++ b/test/fixtures/harmony/uncategorised/114/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 25,
"loc": {
@@ -107,46 +107,32 @@
},
"static": true,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 20,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 23,
"end": 25,
"loc": {
"start": {
"line": 1,
- "column": 20
+ "column": 23
},
"end": {
"line": 1,
"column": 25
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 23,
- "end": 25,
- "loc": {
- "start": {
- "line": 1,
- "column": 23
- },
- "end": {
- "line": 1,
- "column": 25
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/115/expected.json b/test/fixtures/harmony/uncategorised/115/expected.json
index 9b6a05da2a..75c400a2a7 100644
--- a/test/fixtures/harmony/uncategorised/115/expected.json
+++ b/test/fixtures/harmony/uncategorised/115/expected.json
@@ -90,7 +90,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 19,
"end": 31,
"loc": {
@@ -122,46 +122,32 @@
},
"static": false,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 26,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 29,
"end": 31,
"loc": {
"start": {
"line": 1,
- "column": 26
+ "column": 29
},
"end": {
"line": 1,
"column": 31
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 29,
- "end": 31,
- "loc": {
- "start": {
- "line": 1,
- "column": 29
- },
- "end": {
- "line": 1,
- "column": 31
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/116/expected.json b/test/fixtures/harmony/uncategorised/116/expected.json
index 787e636554..c3fa277a2f 100644
--- a/test/fixtures/harmony/uncategorised/116/expected.json
+++ b/test/fixtures/harmony/uncategorised/116/expected.json
@@ -90,7 +90,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 20,
"end": 39,
"loc": {
@@ -122,46 +122,32 @@
},
"static": true,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 34,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 37,
"end": 39,
"loc": {
"start": {
"line": 1,
- "column": 34
+ "column": 37
},
"end": {
"line": 1,
"column": 39
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 37,
- "end": 39,
- "loc": {
- "start": {
- "line": 1,
- "column": 37
- },
- "end": {
- "line": 1,
- "column": 39
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/117/expected.json b/test/fixtures/harmony/uncategorised/117/expected.json
index 0a4f8836f9..d607a58aad 100644
--- a/test/fixtures/harmony/uncategorised/117/expected.json
+++ b/test/fixtures/harmony/uncategorised/117/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 9,
"end": 20,
"loc": {
@@ -107,63 +107,49 @@
},
"static": false,
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 14,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 18,
"end": 20,
"loc": {
"start": {
"line": 1,
- "column": 14
+ "column": 18
},
"end": {
"line": 1,
"column": 20
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 15,
- "end": 16,
- "loc": {
- "start": {
- "line": 1,
- "column": 15
- },
- "end": {
- "line": 1,
- "column": 16
- }
- },
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 18,
- "end": 20,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 20
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/118/expected.json b/test/fixtures/harmony/uncategorised/118/expected.json
index 58a55c8a4c..54e7adf346 100644
--- a/test/fixtures/harmony/uncategorised/118/expected.json
+++ b/test/fixtures/harmony/uncategorised/118/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 28,
"loc": {
@@ -107,63 +107,49 @@
},
"static": true,
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 22,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 26,
"end": 28,
"loc": {
"start": {
"line": 1,
- "column": 22
+ "column": 26
},
"end": {
"line": 1,
"column": 28
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 23,
- "end": 24,
- "loc": {
- "start": {
- "line": 1,
- "column": 23
- },
- "end": {
- "line": 1,
- "column": 24
- }
- },
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 26,
- "end": 28,
- "loc": {
- "start": {
- "line": 1,
- "column": 26
- },
- "end": {
- "line": 1,
- "column": 28
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/119/expected.json b/test/fixtures/harmony/uncategorised/119/expected.json
index e8659d9d1a..e47c5c6942 100644
--- a/test/fixtures/harmony/uncategorised/119/expected.json
+++ b/test/fixtures/harmony/uncategorised/119/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 9,
"end": 18,
"loc": {
@@ -107,63 +107,49 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 12,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 13,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
"end": 18,
"loc": {
"start": {
"line": 1,
- "column": 12
+ "column": 16
},
"end": {
"line": 1,
"column": 18
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 13,
- "end": 14,
- "loc": {
- "start": {
- "line": 1,
- "column": 13
- },
- "end": {
- "line": 1,
- "column": 14
- }
- },
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 16,
- "end": 18,
- "loc": {
- "start": {
- "line": 1,
- "column": 16
- },
- "end": {
- "line": 1,
- "column": 18
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/12/expected.json b/test/fixtures/harmony/uncategorised/12/expected.json
index eaf92df189..8e5a64d7e3 100644
--- a/test/fixtures/harmony/uncategorised/12/expected.json
+++ b/test/fixtures/harmony/uncategorised/12/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,12 +56,14 @@
"column": 3
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0b0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0b0"
+ },
+ "value": 0
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/120/expected.json b/test/fixtures/harmony/uncategorised/120/expected.json
index 4cbc7e1ce5..873df88c9f 100644
--- a/test/fixtures/harmony/uncategorised/120/expected.json
+++ b/test/fixtures/harmony/uncategorised/120/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 26,
"loc": {
@@ -107,63 +107,49 @@
},
"static": true,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 20,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 24,
"end": 26,
"loc": {
"start": {
"line": 1,
- "column": 20
+ "column": 24
},
"end": {
"line": 1,
"column": 26
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 21,
- "end": 22,
- "loc": {
- "start": {
- "line": 1,
- "column": 21
- },
- "end": {
- "line": 1,
- "column": 22
- }
- },
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 24,
- "end": 26,
- "loc": {
- "start": {
- "line": 1,
- "column": 24
- },
- "end": {
- "line": 1,
- "column": 26
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/121/expected.json b/test/fixtures/harmony/uncategorised/121/expected.json
index ae61f95fb4..f1e8a83082 100644
--- a/test/fixtures/harmony/uncategorised/121/expected.json
+++ b/test/fixtures/harmony/uncategorised/121/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 9,
"end": 29,
"loc": {
@@ -107,60 +107,60 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 13,
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
"end": 29,
"loc": {
"start": {
"line": 1,
- "column": 13
+ "column": 17
},
"end": {
"line": 1,
"column": 29
}
},
- "id": null,
- "generator": true,
- "expression": false,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 14,
- "end": 15,
+ "type": "ExpressionStatement",
+ "start": 19,
+ "end": 27,
"loc": {
"start": {
"line": 1,
- "column": 14
+ "column": 19
},
"end": {
"line": 1,
- "column": 15
+ "column": 27
}
},
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 17,
- "end": 29,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 29
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "YieldExpression",
"start": 19,
- "end": 27,
+ "end": 26,
"loc": {
"start": {
"line": 1,
@@ -168,50 +168,36 @@
},
"end": {
"line": 1,
- "column": 27
+ "column": 26
}
},
- "expression": {
- "type": "YieldExpression",
- "start": 19,
+ "delegate": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 25,
"end": 26,
"loc": {
"start": {
"line": 1,
- "column": 19
+ "column": 25
},
"end": {
"line": 1,
"column": 26
}
},
- "delegate": false,
- "argument": {
- "type": "Identifier",
- "start": 25,
- "end": 26,
- "loc": {
- "start": {
- "line": 1,
- "column": 25
- },
- "end": {
- "line": 1,
- "column": 26
- }
- },
- "name": "v"
- }
+ "name": "v"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/122/expected.json b/test/fixtures/harmony/uncategorised/122/expected.json
index 305a0a44a9..0c6728f1b8 100644
--- a/test/fixtures/harmony/uncategorised/122/expected.json
+++ b/test/fixtures/harmony/uncategorised/122/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 37,
"loc": {
@@ -107,60 +107,60 @@
},
"static": true,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 21,
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 22,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 25,
"end": 37,
"loc": {
"start": {
"line": 1,
- "column": 21
+ "column": 25
},
"end": {
"line": 1,
"column": 37
}
},
- "id": null,
- "generator": true,
- "expression": false,
- "params": [
+ "body": [
{
- "type": "Identifier",
- "start": 22,
- "end": 23,
+ "type": "ExpressionStatement",
+ "start": 27,
+ "end": 35,
"loc": {
"start": {
"line": 1,
- "column": 22
+ "column": 27
},
"end": {
"line": 1,
- "column": 23
+ "column": 35
}
},
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 25,
- "end": 37,
- "loc": {
- "start": {
- "line": 1,
- "column": 25
- },
- "end": {
- "line": 1,
- "column": 37
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "YieldExpression",
"start": 27,
- "end": 35,
+ "end": 34,
"loc": {
"start": {
"line": 1,
@@ -168,50 +168,36 @@
},
"end": {
"line": 1,
- "column": 35
+ "column": 34
}
},
- "expression": {
- "type": "YieldExpression",
- "start": 27,
+ "delegate": false,
+ "argument": {
+ "type": "Identifier",
+ "start": 33,
"end": 34,
"loc": {
"start": {
"line": 1,
- "column": 27
+ "column": 33
},
"end": {
"line": 1,
"column": 34
}
},
- "delegate": false,
- "argument": {
- "type": "Identifier",
- "start": 33,
- "end": 34,
- "loc": {
- "start": {
- "line": 1,
- "column": 33
- },
- "end": {
- "line": 1,
- "column": 34
- }
- },
- "name": "v"
- }
+ "name": "v"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/123/expected.json b/test/fixtures/harmony/uncategorised/123/expected.json
index 4cf591f784..2b8ddddaf7 100644
--- a/test/fixtures/harmony/uncategorised/123/expected.json
+++ b/test/fixtures/harmony/uncategorised/123/expected.json
@@ -28,39 +28,6 @@
},
"sourceType": "script",
"body": [
- {
- "type": "ExpressionStatement",
- "start": 0,
- "end": 13,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 13
- }
- },
- "expression": {
- "type": "Literal",
- "start": 0,
- "end": 12,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 12
- }
- },
- "value": "use strict",
- "rawValue": "use strict",
- "raw": "\"use strict\""
- }
- },
{
"type": "ExpressionStatement",
"start": 14,
@@ -122,7 +89,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 24,
"end": 49,
"loc": {
@@ -154,41 +121,41 @@
},
"static": false,
"kind": "constructor",
- "value": {
- "type": "FunctionExpression",
- "start": 35,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 38,
"end": 49,
"loc": {
"start": {
"line": 1,
- "column": 35
+ "column": 38
},
"end": {
"line": 1,
"column": 49
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 38,
- "end": 49,
- "loc": {
- "start": {
- "line": 1,
- "column": 38
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 40,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
},
- "end": {
- "line": 1,
- "column": 49
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
"start": 40,
"end": 47,
"loc": {
@@ -201,10 +168,10 @@
"column": 47
}
},
- "expression": {
- "type": "CallExpression",
+ "callee": {
+ "type": "Super",
"start": 40,
- "end": 47,
+ "end": 45,
"loc": {
"start": {
"line": 1,
@@ -212,37 +179,61 @@
},
"end": {
"line": 1,
- "column": 47
+ "column": 45
}
- },
- "callee": {
- "type": "Super",
- "start": 40,
- "end": 45,
- "loc": {
- "start": {
- "line": 1,
- "column": 40
- },
- "end": {
- "line": 1,
- "column": 45
- }
- }
- },
- "arguments": []
- }
+ }
+ },
+ "arguments": []
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "value": "use strict",
+ "extra": {
+ "raw": "\"use strict\"",
+ "rawValue": "use strict"
+ }
}
}
]
- },
- "comments": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/124/expected.json b/test/fixtures/harmony/uncategorised/124/expected.json
index 7a76a503ec..7c01cad6f1 100644
--- a/test/fixtures/harmony/uncategorised/124/expected.json
+++ b/test/fixtures/harmony/uncategorised/124/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 9,
"end": 27,
"loc": {
@@ -90,7 +90,7 @@
},
"computed": false,
"key": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 9,
"end": 22,
"loc": {
@@ -103,51 +103,40 @@
"column": 22
}
},
- "value": "constructor",
- "rawValue": "constructor",
- "raw": "'constructor'"
+ "extra": {
+ "rawValue": "constructor",
+ "raw": "'constructor'"
+ },
+ "value": "constructor"
},
"static": false,
"kind": "constructor",
- "value": {
- "type": "FunctionExpression",
- "start": 22,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 25,
"end": 27,
"loc": {
"start": {
"line": 1,
- "column": 22
+ "column": 25
},
"end": {
"line": 1,
"column": 27
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 25,
- "end": 27,
- "loc": {
- "start": {
- "line": 1,
- "column": 25
- },
- "end": {
- "line": 1,
- "column": 27
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/128/expected.json b/test/fixtures/harmony/uncategorised/128/expected.json
index fe353f8bba..937272b468 100644
--- a/test/fixtures/harmony/uncategorised/128/expected.json
+++ b/test/fixtures/harmony/uncategorised/128/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 9,
"end": 24,
"loc": {
@@ -107,46 +107,32 @@
},
"static": true,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 19,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 22,
"end": 24,
"loc": {
"start": {
"line": 1,
- "column": 19
+ "column": 22
},
"end": {
"line": 1,
"column": 24
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 22,
- "end": 24,
- "loc": {
- "start": {
- "line": 1,
- "column": 22
- },
- "end": {
- "line": 1,
- "column": 24
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/129/expected.json b/test/fixtures/harmony/uncategorised/129/expected.json
index 6e71914af1..bb30c8aa84 100644
--- a/test/fixtures/harmony/uncategorised/129/expected.json
+++ b/test/fixtures/harmony/uncategorised/129/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 9,
"end": 17,
"loc": {
@@ -107,44 +107,30 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 12,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 15,
"end": 17,
"loc": {
"start": {
"line": 1,
- "column": 12
+ "column": 15
},
"end": {
"line": 1,
"column": 17
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 15,
- "end": 17,
- "loc": {
- "start": {
- "line": 1,
- "column": 15
- },
- "end": {
- "line": 1,
- "column": 17
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 18,
"end": 33,
"loc": {
@@ -176,46 +162,32 @@
},
"static": true,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 28,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 31,
"end": 33,
"loc": {
"start": {
"line": 1,
- "column": 28
+ "column": 31
},
"end": {
"line": 1,
"column": 33
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 31,
- "end": 33,
- "loc": {
- "start": {
- "line": 1,
- "column": 31
- },
- "end": {
- "line": 1,
- "column": 33
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/13/expected.json b/test/fixtures/harmony/uncategorised/13/expected.json
index 2f625b7911..869a4573f6 100644
--- a/test/fixtures/harmony/uncategorised/13/expected.json
+++ b/test/fixtures/harmony/uncategorised/13/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,12 +56,14 @@
"column": 3
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "0b1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "0b1"
+ },
+ "value": 1
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/130/actual.js b/test/fixtures/harmony/uncategorised/130/actual.js
deleted file mode 100644
index 42108ece49..0000000000
--- a/test/fixtures/harmony/uncategorised/130/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict"; (class A { static constructor() { super() }})
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/130/expected.json b/test/fixtures/harmony/uncategorised/130/expected.json
deleted file mode 100644
index c0bdfdc191..0000000000
--- a/test/fixtures/harmony/uncategorised/130/expected.json
+++ /dev/null
@@ -1,248 +0,0 @@
-{
- "type": "File",
- "start": 0,
- "end": 59,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 59
- }
- },
- "program": {
- "type": "Program",
- "start": 0,
- "end": 59,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 59
- }
- },
- "sourceType": "script",
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 0,
- "end": 13,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 13
- }
- },
- "expression": {
- "type": "Literal",
- "start": 0,
- "end": 12,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 12
- }
- },
- "value": "use strict",
- "rawValue": "use strict",
- "raw": "\"use strict\""
- }
- },
- {
- "type": "ExpressionStatement",
- "start": 14,
- "end": 59,
- "loc": {
- "start": {
- "line": 1,
- "column": 14
- },
- "end": {
- "line": 1,
- "column": 59
- }
- },
- "expression": {
- "type": "ClassExpression",
- "start": 15,
- "end": 58,
- "loc": {
- "start": {
- "line": 1,
- "column": 15
- },
- "end": {
- "line": 1,
- "column": 58
- }
- },
- "id": {
- "type": "Identifier",
- "start": 21,
- "end": 22,
- "loc": {
- "start": {
- "line": 1,
- "column": 21
- },
- "end": {
- "line": 1,
- "column": 22
- }
- },
- "name": "A"
- },
- "superClass": null,
- "body": {
- "type": "ClassBody",
- "start": 23,
- "end": 58,
- "loc": {
- "start": {
- "line": 1,
- "column": 23
- },
- "end": {
- "line": 1,
- "column": 58
- }
- },
- "body": [
- {
- "type": "MethodDefinition",
- "start": 25,
- "end": 57,
- "loc": {
- "start": {
- "line": 1,
- "column": 25
- },
- "end": {
- "line": 1,
- "column": 57
- }
- },
- "computed": false,
- "key": {
- "type": "Identifier",
- "start": 32,
- "end": 43,
- "loc": {
- "start": {
- "line": 1,
- "column": 32
- },
- "end": {
- "line": 1,
- "column": 43
- }
- },
- "name": "constructor"
- },
- "static": true,
- "kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 43,
- "end": 57,
- "loc": {
- "start": {
- "line": 1,
- "column": 43
- },
- "end": {
- "line": 1,
- "column": 57
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 46,
- "end": 57,
- "loc": {
- "start": {
- "line": 1,
- "column": 46
- },
- "end": {
- "line": 1,
- "column": 57
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 48,
- "end": 55,
- "loc": {
- "start": {
- "line": 1,
- "column": 48
- },
- "end": {
- "line": 1,
- "column": 55
- }
- },
- "expression": {
- "type": "CallExpression",
- "start": 48,
- "end": 55,
- "loc": {
- "start": {
- "line": 1,
- "column": 48
- },
- "end": {
- "line": 1,
- "column": 55
- }
- },
- "callee": {
- "type": "Super",
- "start": 48,
- "end": 53,
- "loc": {
- "start": {
- "line": 1,
- "column": 48
- },
- "end": {
- "line": 1,
- "column": 53
- }
- }
- },
- "arguments": []
- }
- }
- ]
- }
- }
- }
- ]
- },
- "parenthesizedExpression": true
- }
- }
- ]
- },
- "comments": []
-}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/131/expected.json b/test/fixtures/harmony/uncategorised/131/expected.json
index ee42e3d61e..8c38e200c5 100644
--- a/test/fixtures/harmony/uncategorised/131/expected.json
+++ b/test/fixtures/harmony/uncategorised/131/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 18,
"loc": {
@@ -107,44 +107,30 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 13,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
"end": 18,
"loc": {
"start": {
"line": 1,
- "column": 13
+ "column": 16
},
"end": {
"line": 1,
"column": 18
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 16,
- "end": 18,
- "loc": {
- "start": {
- "line": 1,
- "column": 16
- },
- "end": {
- "line": 1,
- "column": 18
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 19,
"end": 27,
"loc": {
@@ -176,46 +162,32 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 22,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 25,
"end": 27,
"loc": {
"start": {
"line": 1,
- "column": 22
+ "column": 25
},
"end": {
"line": 1,
"column": 27
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 25,
- "end": 27,
- "loc": {
- "start": {
- "line": 1,
- "column": 25
- },
- "end": {
- "line": 1,
- "column": 27
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/132/expected.json b/test/fixtures/harmony/uncategorised/132/expected.json
index 1cdc2db117..7468edee54 100644
--- a/test/fixtures/harmony/uncategorised/132/expected.json
+++ b/test/fixtures/harmony/uncategorised/132/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 22,
"loc": {
@@ -107,44 +107,30 @@
},
"static": false,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 17,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
"end": 22,
"loc": {
"start": {
"line": 1,
- "column": 17
+ "column": 20
},
"end": {
"line": 1,
"column": 22
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 20,
- "end": 22,
- "loc": {
- "start": {
- "line": 1,
- "column": 20
- },
- "end": {
- "line": 1,
- "column": 22
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 23,
"end": 36,
"loc": {
@@ -176,63 +162,49 @@
},
"static": false,
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 30,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 34,
"end": 36,
"loc": {
"start": {
"line": 1,
- "column": 30
+ "column": 34
},
"end": {
"line": 1,
"column": 36
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 31,
- "end": 32,
- "loc": {
- "start": {
- "line": 1,
- "column": 31
- },
- "end": {
- "line": 1,
- "column": 32
- }
- },
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 34,
- "end": 36,
- "loc": {
- "start": {
- "line": 1,
- "column": 34
- },
- "end": {
- "line": 1,
- "column": 36
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/133/expected.json b/test/fixtures/harmony/uncategorised/133/expected.json
index 5c02d2eecd..7e8a2075c5 100644
--- a/test/fixtures/harmony/uncategorised/133/expected.json
+++ b/test/fixtures/harmony/uncategorised/133/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 29,
"loc": {
@@ -107,44 +107,30 @@
},
"static": true,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 24,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
"end": 29,
"loc": {
"start": {
"line": 1,
- "column": 24
+ "column": 27
},
"end": {
"line": 1,
"column": 29
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 27,
- "end": 29,
- "loc": {
- "start": {
- "line": 1,
- "column": 27
- },
- "end": {
- "line": 1,
- "column": 29
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 30,
"end": 42,
"loc": {
@@ -176,46 +162,32 @@
},
"static": false,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 37,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 40,
"end": 42,
"loc": {
"start": {
"line": 1,
- "column": 37
+ "column": 40
},
"end": {
"line": 1,
"column": 42
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 40,
- "end": 42,
- "loc": {
- "start": {
- "line": 1,
- "column": 40
- },
- "end": {
- "line": 1,
- "column": 42
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/134/expected.json b/test/fixtures/harmony/uncategorised/134/expected.json
index 7254b30243..d81ed33228 100644
--- a/test/fixtures/harmony/uncategorised/134/expected.json
+++ b/test/fixtures/harmony/uncategorised/134/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 29,
"loc": {
@@ -107,44 +107,30 @@
},
"static": true,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 24,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
"end": 29,
"loc": {
"start": {
"line": 1,
- "column": 24
+ "column": 27
},
"end": {
"line": 1,
"column": 29
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 27,
- "end": 29,
- "loc": {
- "start": {
- "line": 1,
- "column": 27
- },
- "end": {
- "line": 1,
- "column": 29
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 30,
"end": 49,
"loc": {
@@ -176,46 +162,32 @@
},
"static": true,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 44,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 47,
"end": 49,
"loc": {
"start": {
"line": 1,
- "column": 44
+ "column": 47
},
"end": {
"line": 1,
"column": 49
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 47,
- "end": 49,
- "loc": {
- "start": {
- "line": 1,
- "column": 47
- },
- "end": {
- "line": 1,
- "column": 49
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/135/expected.json b/test/fixtures/harmony/uncategorised/135/expected.json
index 0b1130de7c..834c4dccf7 100644
--- a/test/fixtures/harmony/uncategorised/135/expected.json
+++ b/test/fixtures/harmony/uncategorised/135/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 29,
"loc": {
@@ -107,44 +107,30 @@
},
"static": true,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 24,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
"end": 29,
"loc": {
"start": {
"line": 1,
- "column": 24
+ "column": 27
},
"end": {
"line": 1,
"column": 29
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 27,
- "end": 29,
- "loc": {
- "start": {
- "line": 1,
- "column": 27
- },
- "end": {
- "line": 1,
- "column": 29
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 30,
"end": 50,
"loc": {
@@ -176,61 +162,47 @@
},
"static": true,
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 44,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 45,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 45
+ },
+ "end": {
+ "line": 1,
+ "column": 46
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 48,
"end": 50,
"loc": {
"start": {
"line": 1,
- "column": 44
+ "column": 48
},
"end": {
"line": 1,
"column": 50
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 45,
- "end": 46,
- "loc": {
- "start": {
- "line": 1,
- "column": 45
- },
- "end": {
- "line": 1,
- "column": 46
- }
- },
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 48,
- "end": 50,
- "loc": {
- "start": {
- "line": 1,
- "column": 48
- },
- "end": {
- "line": 1,
- "column": 50
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 51,
"end": 63,
"loc": {
@@ -262,44 +234,30 @@
},
"static": false,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 58,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 61,
"end": 63,
"loc": {
"start": {
"line": 1,
- "column": 58
+ "column": 61
},
"end": {
"line": 1,
"column": 63
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 61,
- "end": 63,
- "loc": {
- "start": {
- "line": 1,
- "column": 61
- },
- "end": {
- "line": 1,
- "column": 63
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 64,
"end": 77,
"loc": {
@@ -331,63 +289,49 @@
},
"static": false,
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 71,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 72,
+ "end": 73,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 72
+ },
+ "end": {
+ "line": 1,
+ "column": 73
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 75,
"end": 77,
"loc": {
"start": {
"line": 1,
- "column": 71
+ "column": 75
},
"end": {
"line": 1,
"column": 77
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 72,
- "end": 73,
- "loc": {
- "start": {
- "line": 1,
- "column": 72
- },
- "end": {
- "line": 1,
- "column": 73
- }
- },
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 75,
- "end": 77,
- "loc": {
- "start": {
- "line": 1,
- "column": 75
- },
- "end": {
- "line": 1,
- "column": 77
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/136/expected.json b/test/fixtures/harmony/uncategorised/136/expected.json
index 2e0cf52943..22216e8a4d 100644
--- a/test/fixtures/harmony/uncategorised/136/expected.json
+++ b/test/fixtures/harmony/uncategorised/136/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 27,
"loc": {
@@ -107,46 +107,32 @@
},
"static": true,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 22,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 25,
"end": 27,
"loc": {
"start": {
"line": 1,
- "column": 22
+ "column": 25
},
"end": {
"line": 1,
"column": 27
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 25,
- "end": 27,
- "loc": {
- "start": {
- "line": 1,
- "column": 25
- },
- "end": {
- "line": 1,
- "column": 27
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/137/expected.json b/test/fixtures/harmony/uncategorised/137/expected.json
index 81860c95fb..379914b948 100644
--- a/test/fixtures/harmony/uncategorised/137/expected.json
+++ b/test/fixtures/harmony/uncategorised/137/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 31,
"loc": {
@@ -107,46 +107,32 @@
},
"static": true,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 26,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 29,
"end": 31,
"loc": {
"start": {
"line": 1,
- "column": 26
+ "column": 29
},
"end": {
"line": 1,
"column": 31
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 29,
- "end": 31,
- "loc": {
- "start": {
- "line": 1,
- "column": 29
- },
- "end": {
- "line": 1,
- "column": 31
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/138/expected.json b/test/fixtures/harmony/uncategorised/138/expected.json
index dec1437174..36e95c1207 100644
--- a/test/fixtures/harmony/uncategorised/138/expected.json
+++ b/test/fixtures/harmony/uncategorised/138/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 23,
"loc": {
@@ -107,61 +107,47 @@
},
"static": false,
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 17,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 21,
"end": 23,
"loc": {
"start": {
"line": 1,
- "column": 17
+ "column": 21
},
"end": {
"line": 1,
"column": 23
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 18,
- "end": 19,
- "loc": {
- "start": {
- "line": 1,
- "column": 18
- },
- "end": {
- "line": 1,
- "column": 19
- }
- },
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 21,
- "end": 23,
- "loc": {
- "start": {
- "line": 1,
- "column": 21
- },
- "end": {
- "line": 1,
- "column": 23
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 24,
"end": 36,
"loc": {
@@ -193,46 +179,32 @@
},
"static": false,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 31,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 34,
"end": 36,
"loc": {
"start": {
"line": 1,
- "column": 31
+ "column": 34
},
"end": {
"line": 1,
"column": 36
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 34,
- "end": 36,
- "loc": {
- "start": {
- "line": 1,
- "column": 34
- },
- "end": {
- "line": 1,
- "column": 36
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/139/expected.json b/test/fixtures/harmony/uncategorised/139/expected.json
index bde2d7b1d9..ada61eb661 100644
--- a/test/fixtures/harmony/uncategorised/139/expected.json
+++ b/test/fixtures/harmony/uncategorised/139/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 18,
"loc": {
@@ -107,44 +107,30 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 13,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 16,
"end": 18,
"loc": {
"start": {
"line": 1,
- "column": 13
+ "column": 16
},
"end": {
"line": 1,
"column": 18
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 16,
- "end": 18,
- "loc": {
- "start": {
- "line": 1,
- "column": 16
- },
- "end": {
- "line": 1,
- "column": 18
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 19,
"end": 31,
"loc": {
@@ -176,46 +162,32 @@
},
"static": false,
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 26,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 29,
"end": 31,
"loc": {
"start": {
"line": 1,
- "column": 26
+ "column": 29
},
"end": {
"line": 1,
"column": 31
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 29,
- "end": 31,
- "loc": {
- "start": {
- "line": 1,
- "column": 29
- },
- "end": {
- "line": 1,
- "column": 31
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/14/expected.json b/test/fixtures/harmony/uncategorised/14/expected.json
index 49de700092..946f9be4db 100644
--- a/test/fixtures/harmony/uncategorised/14/expected.json
+++ b/test/fixtures/harmony/uncategorised/14/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -56,12 +56,14 @@
"column": 4
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "0b10"
+ "extra": {
+ "rawValue": 2,
+ "raw": "0b10"
+ },
+ "value": 2
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/141/expected.json b/test/fixtures/harmony/uncategorised/141/expected.json
index 3ab0349417..fe8be3d209 100644
--- a/test/fixtures/harmony/uncategorised/141/expected.json
+++ b/test/fixtures/harmony/uncategorised/141/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 2,
"end": 9,
"loc": {
@@ -91,7 +91,7 @@
"name": "x"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 7,
"end": 9,
"loc": {
@@ -104,17 +104,20 @@
"column": 9
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/142/expected.json b/test/fixtures/harmony/uncategorised/142/expected.json
index 970e72e609..83f683e3eb 100644
--- a/test/fixtures/harmony/uncategorised/142/expected.json
+++ b/test/fixtures/harmony/uncategorised/142/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 2,
"end": 17,
"loc": {
@@ -89,7 +89,7 @@
}
},
"left": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 3,
"end": 6,
"loc": {
@@ -102,13 +102,15 @@
"column": 6
}
},
- "value": "x",
- "rawValue": "x",
- "raw": "\"x\""
+ "extra": {
+ "rawValue": "x",
+ "raw": "\"x\""
+ },
+ "value": "x"
},
"operator": "+",
"right": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 9,
"end": 12,
"loc": {
@@ -121,13 +123,15 @@
"column": 12
}
},
- "value": "y",
- "rawValue": "y",
- "raw": "\"y\""
+ "extra": {
+ "rawValue": "y",
+ "raw": "\"y\""
+ },
+ "value": "y"
}
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 15,
"end": 17,
"loc": {
@@ -140,17 +144,20 @@
"column": 17
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/143/expected.json b/test/fixtures/harmony/uncategorised/143/expected.json
index d73cb3b632..cc0ab8afc8 100644
--- a/test/fixtures/harmony/uncategorised/143/expected.json
+++ b/test/fixtures/harmony/uncategorised/143/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 2,
"end": 20,
"loc": {
@@ -122,16 +122,18 @@
"column": 20
}
},
- "body": []
+ "body": [],
+ "directives": []
}
- },
- "kind": "init"
+ }
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/144/expected.json b/test/fixtures/harmony/uncategorised/144/expected.json
index 682d65ed9c..c054f5cc59 100644
--- a/test/fixtures/harmony/uncategorised/144/expected.json
+++ b/test/fixtures/harmony/uncategorised/144/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 2,
"end": 9,
"loc": {
@@ -91,7 +91,7 @@
"name": "x"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 7,
"end": 9,
"loc": {
@@ -104,14 +104,15 @@
"column": 9
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 11,
"end": 16,
"loc": {
@@ -144,7 +145,7 @@
"name": "y"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 14,
"end": 16,
"loc": {
@@ -157,17 +158,20 @@
"column": 16
}
},
- "value": 20,
- "rawValue": 20,
- "raw": "20"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 20,
+ "raw": "20"
+ },
+ "value": 20
+ }
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/145/expected.json b/test/fixtures/harmony/uncategorised/145/expected.json
index 081f297ff9..c87f359ecb 100644
--- a/test/fixtures/harmony/uncategorised/145/expected.json
+++ b/test/fixtures/harmony/uncategorised/145/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 2,
"end": 14,
"loc": {
@@ -91,44 +91,30 @@
"name": "x"
},
"kind": "get",
- "value": {
- "type": "FunctionExpression",
- "start": 9,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 12,
"end": 14,
"loc": {
"start": {
"line": 1,
- "column": 9
+ "column": 12
},
"end": {
"line": 1,
"column": 14
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 12,
- "end": 14,
- "loc": {
- "start": {
- "line": 1,
- "column": 12
- },
- "end": {
- "line": 1,
- "column": 14
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
},
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 16,
"end": 29,
"loc": {
@@ -161,64 +147,52 @@
"name": "x"
},
"kind": "set",
- "value": {
- "type": "FunctionExpression",
- "start": 23,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 24,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "v"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 27,
"end": 29,
"loc": {
"start": {
"line": 1,
- "column": 23
+ "column": 27
},
"end": {
"line": 1,
"column": 29
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 24,
- "end": 25,
- "loc": {
- "start": {
- "line": 1,
- "column": 24
- },
- "end": {
- "line": 1,
- "column": 25
- }
- },
- "name": "v"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 27,
- "end": 29,
- "loc": {
- "start": {
- "line": 1,
- "column": 27
- },
- "end": {
- "line": 1,
- "column": 29
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/146/expected.json b/test/fixtures/harmony/uncategorised/146/expected.json
index 084e6c8144..8ab9dd27fd 100644
--- a/test/fixtures/harmony/uncategorised/146/expected.json
+++ b/test/fixtures/harmony/uncategorised/146/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 2,
"end": 10,
"loc": {
@@ -90,48 +90,36 @@
},
"name": "x"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 5,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 8,
"end": 10,
"loc": {
"start": {
"line": 1,
- "column": 5
+ "column": 8
},
"end": {
"line": 1,
"column": 10
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 8,
- "end": 10,
- "loc": {
- "start": {
- "line": 1,
- "column": 8
- },
- "end": {
- "line": 1,
- "column": 10
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/147/expected.json b/test/fixtures/harmony/uncategorised/147/expected.json
index f4966b1c1f..e9263cf600 100644
--- a/test/fixtures/harmony/uncategorised/147/expected.json
+++ b/test/fixtures/harmony/uncategorised/147/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 11,
"loc": {
@@ -120,8 +120,7 @@
}
},
"name": "y"
- },
- "kind": "init"
+ }
}
]
},
@@ -141,7 +140,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 16,
"end": 17,
"loc": {
@@ -173,7 +172,6 @@
},
"name": "y"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 16,
@@ -197,7 +195,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/148/expected.json b/test/fixtures/harmony/uncategorised/148/expected.json
index 35f50da821..c2c6fcf107 100644
--- a/test/fixtures/harmony/uncategorised/148/expected.json
+++ b/test/fixtures/harmony/uncategorised/148/expected.json
@@ -77,7 +77,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 12,
"end": 18,
"loc": {
@@ -124,8 +124,7 @@
}
},
"name": "y"
- },
- "kind": "init"
+ }
}
]
}
@@ -144,10 +143,11 @@
"column": 23
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/149/expected.json b/test/fixtures/harmony/uncategorised/149/expected.json
index 622622b2ef..2b533c4b95 100644
--- a/test/fixtures/harmony/uncategorised/149/expected.json
+++ b/test/fixtures/harmony/uncategorised/149/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 9,
"end": 32,
"loc": {
@@ -121,44 +121,44 @@
},
"name": "test"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 16,
+ "kind": "method",
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
"end": 32,
"loc": {
"start": {
"line": 1,
- "column": 16
+ "column": 19
},
"end": {
"line": 1,
"column": 32
}
},
- "id": null,
- "generator": true,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 19,
- "end": 32,
- "loc": {
- "start": {
- "line": 1,
- "column": 19
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 21,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
},
- "end": {
- "line": 1,
- "column": 32
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
+ "expression": {
+ "type": "YieldExpression",
"start": 21,
- "end": 30,
+ "end": 29,
"loc": {
"start": {
"line": 1,
@@ -166,44 +166,30 @@
},
"end": {
"line": 1,
- "column": 30
+ "column": 29
}
},
- "expression": {
- "type": "YieldExpression",
- "start": 21,
+ "delegate": true,
+ "argument": {
+ "type": "Identifier",
+ "start": 28,
"end": 29,
"loc": {
"start": {
"line": 1,
- "column": 21
+ "column": 28
},
"end": {
"line": 1,
"column": 29
}
},
- "delegate": true,
- "argument": {
- "type": "Identifier",
- "start": 28,
- "end": 29,
- "loc": {
- "start": {
- "line": 1,
- "column": 28
- },
- "end": {
- "line": 1,
- "column": 29
- }
- },
- "name": "v"
- }
+ "name": "v"
}
}
- ]
- }
+ }
+ ],
+ "directives": []
}
}
]
@@ -212,7 +198,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/15/expected.json b/test/fixtures/harmony/uncategorised/15/expected.json
index 611801c26d..50c71c2d94 100644
--- a/test/fixtures/harmony/uncategorised/15/expected.json
+++ b/test/fixtures/harmony/uncategorised/15/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,12 +56,14 @@
"column": 3
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0B0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0B0"
+ },
+ "value": 0
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/150/expected.json b/test/fixtures/harmony/uncategorised/150/expected.json
index 8e36dcc558..77889bf067 100644
--- a/test/fixtures/harmony/uncategorised/150/expected.json
+++ b/test/fixtures/harmony/uncategorised/150/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 9,
"end": 17,
"loc": {
@@ -107,46 +107,32 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 12,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 15,
"end": 17,
"loc": {
"start": {
"line": 1,
- "column": 12
+ "column": 15
},
"end": {
"line": 1,
"column": 17
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 15,
- "end": 17,
- "loc": {
- "start": {
- "line": 1,
- "column": 15
- },
- "end": {
- "line": 1,
- "column": 17
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/152/expected.json b/test/fixtures/harmony/uncategorised/152/expected.json
index 045e5e565d..0a09df6992 100644
--- a/test/fixtures/harmony/uncategorised/152/expected.json
+++ b/test/fixtures/harmony/uncategorised/152/expected.json
@@ -124,7 +124,7 @@
},
"elements": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 18,
"end": 19,
"loc": {
@@ -137,9 +137,11 @@
"column": 19
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
]
}
@@ -159,10 +161,11 @@
"column": 24
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/153/expected.json b/test/fixtures/harmony/uncategorised/153/expected.json
index 2fbb48c993..898db20cdc 100644
--- a/test/fixtures/harmony/uncategorised/153/expected.json
+++ b/test/fixtures/harmony/uncategorised/153/expected.json
@@ -91,7 +91,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 12,
"end": 13,
"loc": {
@@ -123,7 +123,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 12,
@@ -159,7 +158,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 18,
"end": 23,
"loc": {
@@ -192,7 +191,7 @@
"name": "x"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 21,
"end": 23,
"loc": {
@@ -205,11 +204,12 @@
"column": 23
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
}
]
}
@@ -229,10 +229,11 @@
"column": 28
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/154/expected.json b/test/fixtures/harmony/uncategorised/154/expected.json
index 5c0d184dea..00d6e9bd9a 100644
--- a/test/fixtures/harmony/uncategorised/154/expected.json
+++ b/test/fixtures/harmony/uncategorised/154/expected.json
@@ -121,7 +121,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 14,
"end": 15,
"loc": {
@@ -153,7 +153,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 14,
@@ -189,7 +188,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 20,
"end": 25,
"loc": {
@@ -222,7 +221,7 @@
"name": "x"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 23,
"end": 25,
"loc": {
@@ -235,11 +234,12 @@
"column": 25
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
}
]
}
@@ -259,12 +259,13 @@
"column": 30
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/155/expected.json b/test/fixtures/harmony/uncategorised/155/expected.json
index 446945cf11..648cc628d4 100644
--- a/test/fixtures/harmony/uncategorised/155/expected.json
+++ b/test/fixtures/harmony/uncategorised/155/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 2,
"end": 31,
"loc": {
@@ -138,7 +138,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 15,
"end": 16,
"loc": {
@@ -170,7 +170,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 15,
@@ -206,7 +205,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 21,
"end": 26,
"loc": {
@@ -239,7 +238,7 @@
"name": "x"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 24,
"end": 26,
"loc": {
@@ -252,11 +251,12 @@
"column": 26
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
}
]
}
@@ -276,16 +276,18 @@
"column": 31
}
},
- "body": []
+ "body": [],
+ "directives": []
}
- },
- "kind": "init"
+ }
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/156/expected.json b/test/fixtures/harmony/uncategorised/156/expected.json
index f1b3b84818..ff433a7001 100644
--- a/test/fixtures/harmony/uncategorised/156/expected.json
+++ b/test/fixtures/harmony/uncategorised/156/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 2,
"end": 21,
"loc": {
@@ -90,29 +90,29 @@
},
"name": "f"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 3,
- "end": 21,
- "loc": {
- "start": {
- "line": 1,
- "column": 3
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 4,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
},
- "end": {
- "line": 1,
- "column": 21
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "AssignmentPattern",
+ "left": {
+ "type": "ObjectPattern",
"start": 4,
- "end": 17,
+ "end": 7,
"loc": {
"start": {
"line": 1,
@@ -120,26 +120,29 @@
},
"end": {
"line": 1,
- "column": 17
+ "column": 7
}
},
- "left": {
- "type": "ObjectPattern",
- "start": 4,
- "end": 7,
- "loc": {
- "start": {
- "line": 1,
- "column": 4
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
},
- "end": {
- "line": 1,
- "column": 7
- }
- },
- "properties": [
- {
- "type": "Property",
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
"start": 5,
"end": 6,
"loc": {
@@ -152,140 +155,125 @@
"column": 6
}
},
- "method": false,
- "shorthand": true,
- "computed": false,
- "key": {
- "type": "Identifier",
- "start": 5,
- "end": 6,
- "loc": {
- "start": {
- "line": 1,
- "column": 5
- },
- "end": {
- "line": 1,
- "column": 6
- }
- },
- "name": "x"
- },
- "kind": "init",
- "value": {
- "type": "Identifier",
- "start": 5,
- "end": 6,
- "loc": {
- "start": {
- "line": 1,
- "column": 5
- },
- "end": {
- "line": 1,
- "column": 6
- }
- },
- "name": "x"
- }
- }
- ]
- },
- "right": {
- "type": "ObjectExpression",
- "start": 10,
- "end": 17,
- "loc": {
- "start": {
- "line": 1,
- "column": 10
+ "name": "x"
},
- "end": {
- "line": 1,
- "column": 17
+ "value": {
+ "type": "Identifier",
+ "start": 5,
+ "end": 6,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "name": "x"
}
+ }
+ ]
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 10,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
},
- "properties": [
- {
- "type": "Property",
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 11,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
"start": 11,
- "end": 16,
+ "end": 12,
"loc": {
"start": {
"line": 1,
"column": 11
},
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "x"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 14,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
"end": {
"line": 1,
"column": 16
}
},
- "method": false,
- "shorthand": false,
- "computed": false,
- "key": {
- "type": "Identifier",
- "start": 11,
- "end": 12,
- "loc": {
- "start": {
- "line": 1,
- "column": 11
- },
- "end": {
- "line": 1,
- "column": 12
- }
- },
- "name": "x"
- },
- "value": {
- "type": "Literal",
- "start": 14,
- "end": 16,
- "loc": {
- "start": {
- "line": 1,
- "column": 14
- },
- "end": {
- "line": 1,
- "column": 16
- }
- },
- "value": 10,
+ "extra": {
"rawValue": 10,
"raw": "10"
},
- "kind": "init"
+ "value": 10
}
- ]
- }
+ }
+ ]
}
- ],
- "body": {
- "type": "BlockStatement",
- "start": 19,
- "end": 21,
- "loc": {
- "start": {
- "line": 1,
- "column": 19
- },
- "end": {
- "line": 1,
- "column": 21
- }
- },
- "body": []
}
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "body": [],
+ "directives": []
}
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/157/expected.json b/test/fixtures/harmony/uncategorised/157/expected.json
index 8f9e16207b..16c419f612 100644
--- a/test/fixtures/harmony/uncategorised/157/expected.json
+++ b/test/fixtures/harmony/uncategorised/157/expected.json
@@ -74,7 +74,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 8,
"end": 27,
"loc": {
@@ -106,28 +106,28 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 9,
- "end": 27,
- "loc": {
- "start": {
- "line": 1,
- "column": 9
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 10,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
},
- "end": {
- "line": 1,
- "column": 27
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "AssignmentPattern",
+ "left": {
+ "type": "ObjectPattern",
"start": 10,
- "end": 23,
+ "end": 13,
"loc": {
"start": {
"line": 1,
@@ -135,26 +135,29 @@
},
"end": {
"line": 1,
- "column": 23
+ "column": 13
}
},
- "left": {
- "type": "ObjectPattern",
- "start": 10,
- "end": 13,
- "loc": {
- "start": {
- "line": 1,
- "column": 10
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
},
- "end": {
- "line": 1,
- "column": 13
- }
- },
- "properties": [
- {
- "type": "Property",
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
"start": 11,
"end": 12,
"loc": {
@@ -167,141 +170,126 @@
"column": 12
}
},
- "method": false,
- "shorthand": true,
- "computed": false,
- "key": {
- "type": "Identifier",
- "start": 11,
- "end": 12,
- "loc": {
- "start": {
- "line": 1,
- "column": 11
- },
- "end": {
- "line": 1,
- "column": 12
- }
- },
- "name": "x"
- },
- "kind": "init",
- "value": {
- "type": "Identifier",
- "start": 11,
- "end": 12,
- "loc": {
- "start": {
- "line": 1,
- "column": 11
- },
- "end": {
- "line": 1,
- "column": 12
- }
- },
- "name": "x"
- }
- }
- ]
- },
- "right": {
- "type": "ObjectExpression",
- "start": 16,
- "end": 23,
- "loc": {
- "start": {
- "line": 1,
- "column": 16
+ "name": "x"
},
- "end": {
- "line": 1,
- "column": 23
+ "value": {
+ "type": "Identifier",
+ "start": 11,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "name": "x"
}
+ }
+ ]
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "start": 16,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
},
- "properties": [
- {
- "type": "Property",
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 17,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
"start": 17,
- "end": 22,
+ "end": 18,
"loc": {
"start": {
"line": 1,
"column": 17
},
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "x"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 20
+ },
"end": {
"line": 1,
"column": 22
}
},
- "method": false,
- "shorthand": false,
- "computed": false,
- "key": {
- "type": "Identifier",
- "start": 17,
- "end": 18,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 18
- }
- },
- "name": "x"
- },
- "value": {
- "type": "Literal",
- "start": 20,
- "end": 22,
- "loc": {
- "start": {
- "line": 1,
- "column": 20
- },
- "end": {
- "line": 1,
- "column": 22
- }
- },
- "value": 10,
+ "extra": {
"rawValue": 10,
"raw": "10"
},
- "kind": "init"
+ "value": 10
}
- ]
- }
+ }
+ ]
}
- ],
- "body": {
- "type": "BlockStatement",
- "start": 25,
- "end": 27,
- "loc": {
- "start": {
- "line": 1,
- "column": 25
- },
- "end": {
- "line": 1,
- "column": 27
- }
- },
- "body": []
}
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 25,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "body": [],
+ "directives": []
}
}
]
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/158/expected.json b/test/fixtures/harmony/uncategorised/158/expected.json
index eef638df4a..f37f65a5de 100644
--- a/test/fixtures/harmony/uncategorised/158/expected.json
+++ b/test/fixtures/harmony/uncategorised/158/expected.json
@@ -90,7 +90,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 3,
"end": 4,
"loc": {
@@ -122,7 +122,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 3,
@@ -158,7 +157,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 9,
"end": 14,
"loc": {
@@ -191,7 +190,7 @@
"name": "x"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 14,
"loc": {
@@ -204,11 +203,12 @@
"column": 14
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
}
]
}
@@ -228,12 +228,15 @@
"column": 22
}
},
- "body": []
+ "body": [],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/159/expected.json b/test/fixtures/harmony/uncategorised/159/expected.json
index 1f57c33a36..3799c4ee35 100644
--- a/test/fixtures/harmony/uncategorised/159/expected.json
+++ b/test/fixtures/harmony/uncategorised/159/expected.json
@@ -122,7 +122,7 @@
"name": "y"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 17,
"end": 18,
"loc": {
@@ -135,9 +135,11 @@
"column": 18
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
],
@@ -155,12 +157,13 @@
"column": 22
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/16/expected.json b/test/fixtures/harmony/uncategorised/16/expected.json
index 112c7f0752..94253b3ff7 100644
--- a/test/fixtures/harmony/uncategorised/16/expected.json
+++ b/test/fixtures/harmony/uncategorised/16/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,12 +56,14 @@
"column": 3
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "0B1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "0B1"
+ },
+ "value": 1
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/160/expected.json b/test/fixtures/harmony/uncategorised/160/expected.json
index b9dcf3ed65..b922dc9f54 100644
--- a/test/fixtures/harmony/uncategorised/160/expected.json
+++ b/test/fixtures/harmony/uncategorised/160/expected.json
@@ -92,7 +92,7 @@
"name": "a"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 15,
"end": 16,
"loc": {
@@ -105,9 +105,11 @@
"column": 16
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
],
@@ -125,10 +127,11 @@
"column": 20
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/161/expected.json b/test/fixtures/harmony/uncategorised/161/expected.json
index 50711e7b4a..64c3b49fae 100644
--- a/test/fixtures/harmony/uncategorised/161/expected.json
+++ b/test/fixtures/harmony/uncategorised/161/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 25,
"loc": {
@@ -170,7 +170,7 @@
"name": "a"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 20,
"end": 21,
"loc": {
@@ -183,9 +183,11 @@
"column": 21
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
],
@@ -203,16 +205,16 @@
"column": 25
}
},
- "body": []
+ "body": [],
+ "directives": []
}
- },
- "kind": "init"
+ }
}
]
}
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/162/expected.json b/test/fixtures/harmony/uncategorised/162/expected.json
index 5ba4e49328..324d763163 100644
--- a/test/fixtures/harmony/uncategorised/162/expected.json
+++ b/test/fixtures/harmony/uncategorised/162/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 15,
"loc": {
@@ -121,98 +121,86 @@
},
"name": "f"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 7,
- "end": 15,
- "loc": {
- "start": {
- "line": 1,
- "column": 7
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 8,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
},
- "end": {
- "line": 1,
- "column": 15
- }
- },
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "AssignmentPattern",
+ "left": {
+ "type": "Identifier",
"start": 8,
- "end": 11,
+ "end": 9,
"loc": {
"start": {
"line": 1,
"column": 8
},
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
"end": {
"line": 1,
"column": 11
}
},
- "left": {
- "type": "Identifier",
- "start": 8,
- "end": 9,
- "loc": {
- "start": {
- "line": 1,
- "column": 8
- },
- "end": {
- "line": 1,
- "column": 9
- }
- },
- "name": "a"
- },
- "right": {
- "type": "Literal",
- "start": 10,
- "end": 11,
- "loc": {
- "start": {
- "line": 1,
- "column": 10
- },
- "end": {
- "line": 1,
- "column": 11
- }
- },
- "value": 1,
+ "extra": {
"rawValue": 1,
"raw": "1"
- }
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 13,
- "end": 15,
- "loc": {
- "start": {
- "line": 1,
- "column": 13
},
- "end": {
- "line": 1,
- "column": 15
- }
- },
- "body": []
+ "value": 1
+ }
}
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/165/expected.json b/test/fixtures/harmony/uncategorised/165/expected.json
index 4ba45288ad..08cb8d6662 100644
--- a/test/fixtures/harmony/uncategorised/165/expected.json
+++ b/test/fixtures/harmony/uncategorised/165/expected.json
@@ -77,7 +77,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 13,
"end": 14,
"loc": {
@@ -109,7 +109,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 13,
@@ -128,7 +127,7 @@
}
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 16,
"end": 17,
"loc": {
@@ -160,7 +159,6 @@
},
"name": "b"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 16,
@@ -195,10 +193,11 @@
"column": 22
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/166/expected.json b/test/fixtures/harmony/uncategorised/166/expected.json
index 65c064b712..fecc14e44a 100644
--- a/test/fixtures/harmony/uncategorised/166/expected.json
+++ b/test/fixtures/harmony/uncategorised/166/expected.json
@@ -93,7 +93,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 16,
"end": 17,
"loc": {
@@ -125,7 +125,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 16,
@@ -160,10 +159,11 @@
"column": 22
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/167/options.json b/test/fixtures/harmony/uncategorised/167/options.json
new file mode 100644
index 0000000000..d50e8469b8
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/167/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:14)"
+}
diff --git a/test/fixtures/harmony/uncategorised/168/options.json b/test/fixtures/harmony/uncategorised/168/options.json
new file mode 100644
index 0000000000..9ac2c7432d
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/168/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:42)"
+}
diff --git a/test/fixtures/harmony/uncategorised/169/expected.json b/test/fixtures/harmony/uncategorised/169/expected.json
index 79ea543bbe..7aa4a008d7 100644
--- a/test/fixtures/harmony/uncategorised/169/expected.json
+++ b/test/fixtures/harmony/uncategorised/169/expected.json
@@ -139,12 +139,15 @@
"column": 23
}
},
- "body": []
+ "body": [],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/17/expected.json b/test/fixtures/harmony/uncategorised/17/expected.json
index 5c09cfb02a..5a539443cf 100644
--- a/test/fixtures/harmony/uncategorised/17/expected.json
+++ b/test/fixtures/harmony/uncategorised/17/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -56,12 +56,14 @@
"column": 4
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "0B10"
+ "extra": {
+ "rawValue": 2,
+ "raw": "0B10"
+ },
+ "value": 2
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/170/expected.json b/test/fixtures/harmony/uncategorised/170/expected.json
index 438f7a1d90..50b9811fd9 100644
--- a/test/fixtures/harmony/uncategorised/170/expected.json
+++ b/test/fixtures/harmony/uncategorised/170/expected.json
@@ -91,7 +91,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 14,
"end": 15,
"loc": {
@@ -123,7 +123,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 14,
@@ -142,7 +141,7 @@
}
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 17,
"end": 18,
"loc": {
@@ -174,7 +173,6 @@
},
"name": "b"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 17,
@@ -209,12 +207,15 @@
"column": 23
}
},
- "body": []
+ "body": [],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/171/options.json b/test/fixtures/harmony/uncategorised/171/options.json
new file mode 100644
index 0000000000..98d7123790
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/171/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:15)"
+}
diff --git a/test/fixtures/harmony/uncategorised/172/options.json b/test/fixtures/harmony/uncategorised/172/options.json
new file mode 100644
index 0000000000..ceee1cc2ef
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/172/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:43)"
+}
diff --git a/test/fixtures/harmony/uncategorised/173/expected.json b/test/fixtures/harmony/uncategorised/173/expected.json
index aab765b409..35b8ef2474 100644
--- a/test/fixtures/harmony/uncategorised/173/expected.json
+++ b/test/fixtures/harmony/uncategorised/173/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 3,
"end": 16,
"loc": {
@@ -90,98 +90,86 @@
},
"name": "x"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 4,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "ArrayPattern",
+ "start": 5,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "elements": [
+ {
+ "type": "Identifier",
+ "start": 7,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "Identifier",
+ "start": 10,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": "b"
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 14,
"end": 16,
"loc": {
"start": {
"line": 1,
- "column": 4
+ "column": 14
},
"end": {
"line": 1,
"column": 16
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "ArrayPattern",
- "start": 5,
- "end": 13,
- "loc": {
- "start": {
- "line": 1,
- "column": 5
- },
- "end": {
- "line": 1,
- "column": 13
- }
- },
- "elements": [
- {
- "type": "Identifier",
- "start": 7,
- "end": 8,
- "loc": {
- "start": {
- "line": 1,
- "column": 7
- },
- "end": {
- "line": 1,
- "column": 8
- }
- },
- "name": "a"
- },
- {
- "type": "Identifier",
- "start": 10,
- "end": 11,
- "loc": {
- "start": {
- "line": 1,
- "column": 10
- },
- "end": {
- "line": 1,
- "column": 11
- }
- },
- "name": "b"
- }
- ]
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 14,
- "end": 16,
- "loc": {
- "start": {
- "line": 1,
- "column": 14
- },
- "end": {
- "line": 1,
- "column": 16
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/174/options.json b/test/fixtures/harmony/uncategorised/174/options.json
new file mode 100644
index 0000000000..9ce9658f7d
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/174/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:8)"
+}
diff --git a/test/fixtures/harmony/uncategorised/175/options.json b/test/fixtures/harmony/uncategorised/175/options.json
new file mode 100644
index 0000000000..4914c41568
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/175/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:36)"
+}
diff --git a/test/fixtures/harmony/uncategorised/178/expected.json b/test/fixtures/harmony/uncategorised/178/expected.json
index 806994cb9b..15f1e7078a 100644
--- a/test/fixtures/harmony/uncategorised/178/expected.json
+++ b/test/fixtures/harmony/uncategorised/178/expected.json
@@ -76,7 +76,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 3,
"end": 4,
"loc": {
@@ -108,7 +108,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 3,
@@ -143,11 +142,12 @@
"column": 13
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/179/expected.json b/test/fixtures/harmony/uncategorised/179/expected.json
index 4d7597a5b0..ce3a65a9ee 100644
--- a/test/fixtures/harmony/uncategorised/179/expected.json
+++ b/test/fixtures/harmony/uncategorised/179/expected.json
@@ -76,7 +76,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 3,
"end": 4,
"loc": {
@@ -108,7 +108,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 3,
@@ -174,11 +173,12 @@
"column": 19
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/180/options.json b/test/fixtures/harmony/uncategorised/180/options.json
new file mode 100644
index 0000000000..27a7b64d71
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/180/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:4)"
+}
diff --git a/test/fixtures/harmony/uncategorised/181/options.json b/test/fixtures/harmony/uncategorised/181/options.json
new file mode 100644
index 0000000000..c958665c03
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/181/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Unexpected token (1:7)"
+}
diff --git a/test/fixtures/harmony/uncategorised/182/expected.json b/test/fixtures/harmony/uncategorised/182/expected.json
index d18c636d50..35cdf77789 100644
--- a/test/fixtures/harmony/uncategorised/182/expected.json
+++ b/test/fixtures/harmony/uncategorised/182/expected.json
@@ -76,7 +76,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 3,
"end": 12,
"loc": {
@@ -156,8 +156,7 @@
"name": "b"
}
]
- },
- "kind": "init"
+ }
}
]
},
@@ -207,11 +206,12 @@
"column": 27
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/183/expected.json b/test/fixtures/harmony/uncategorised/183/expected.json
index 52a957065f..79bc67b569 100644
--- a/test/fixtures/harmony/uncategorised/183/expected.json
+++ b/test/fixtures/harmony/uncategorised/183/expected.json
@@ -76,7 +76,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 3,
"end": 7,
"loc": {
@@ -123,11 +123,10 @@
}
},
"name": "b"
- },
- "kind": "init"
+ }
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 9,
"end": 10,
"loc": {
@@ -159,7 +158,6 @@
},
"name": "c"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 9,
@@ -274,11 +272,12 @@
"column": 33
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/186/expected.json b/test/fixtures/harmony/uncategorised/186/expected.json
index 525404a0e1..16d0a3f561 100644
--- a/test/fixtures/harmony/uncategorised/186/expected.json
+++ b/test/fixtures/harmony/uncategorised/186/expected.json
@@ -88,7 +88,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 3,
"end": 4,
"loc": {
@@ -120,7 +120,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 3,
@@ -139,7 +138,7 @@
}
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 7,
"loc": {
@@ -171,7 +170,6 @@
},
"name": "b"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 6,
@@ -242,7 +240,7 @@
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/190/expected.json b/test/fixtures/harmony/uncategorised/190/expected.json
index bb2b744d13..dc0dd1b374 100644
--- a/test/fixtures/harmony/uncategorised/190/expected.json
+++ b/test/fixtures/harmony/uncategorised/190/expected.json
@@ -88,7 +88,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 7,
"end": 8,
"loc": {
@@ -120,7 +120,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 7,
@@ -139,7 +138,7 @@
}
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 10,
"end": 11,
"loc": {
@@ -171,7 +170,6 @@
},
"name": "b"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 10,
@@ -244,7 +242,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/195/expected.json b/test/fixtures/harmony/uncategorised/195/expected.json
index 2ca03c6467..908ecf8753 100644
--- a/test/fixtures/harmony/uncategorised/195/expected.json
+++ b/test/fixtures/harmony/uncategorised/195/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 0,
"end": 8,
"loc": {
@@ -56,13 +56,14 @@
"column": 8
}
},
- "raw": "/[a-z]/u",
- "regex": {
- "pattern": "[a-z]",
- "flags": "u"
- }
+ "extra": {
+ "raw": "/[a-z]/u"
+ },
+ "pattern": "[a-z]",
+ "flags": "u"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/196/expected.json b/test/fixtures/harmony/uncategorised/196/expected.json
index c8b5823f15..04066b5458 100644
--- a/test/fixtures/harmony/uncategorised/196/expected.json
+++ b/test/fixtures/harmony/uncategorised/196/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 0,
"end": 33,
"loc": {
@@ -56,13 +56,14 @@
"column": 33
}
},
- "raw": "/[\\uD834\\uDF06-\\uD834\\uDF08a-z]/u",
- "regex": {
- "pattern": "[\\uD834\\uDF06-\\uD834\\uDF08a-z]",
- "flags": "u"
- }
+ "extra": {
+ "raw": "/[\\uD834\\uDF06-\\uD834\\uDF08a-z]/u"
+ },
+ "pattern": "[\\uD834\\uDF06-\\uD834\\uDF08a-z]",
+ "flags": "u"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/197/expected.json b/test/fixtures/harmony/uncategorised/197/expected.json
index 8b60d84c91..ca35fe564c 100644
--- a/test/fixtures/harmony/uncategorised/197/expected.json
+++ b/test/fixtures/harmony/uncategorised/197/expected.json
@@ -56,10 +56,11 @@
"column": 5
}
},
- "body": []
+ "body": [],
+ "directives": []
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 13,
"end": 18,
"loc": {
@@ -72,9 +73,7 @@
"column": 18
}
},
- "value": false,
- "rawValue": false,
- "raw": "false"
+ "value": false
}
},
{
@@ -124,6 +123,7 @@
"arguments": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/2/expected.json b/test/fixtures/harmony/uncategorised/2/expected.json
index fd4079e13c..7430f1229e 100644
--- a/test/fixtures/harmony/uncategorised/2/expected.json
+++ b/test/fixtures/harmony/uncategorised/2/expected.json
@@ -27,9 +27,10 @@
}
},
"sourceType": "script",
- "body": [
+ "body": [],
+ "directives": [
{
- "type": "ExpressionStatement",
+ "type": "Directive",
"start": 0,
"end": 27,
"loc": {
@@ -42,8 +43,8 @@
"column": 27
}
},
- "expression": {
- "type": "Literal",
+ "value": {
+ "type": "DirectiveLiteral",
"start": 0,
"end": 27,
"loc": {
@@ -56,12 +57,13 @@
"column": 27
}
},
- "value": "𠮷野家",
- "rawValue": "𠮷野家",
- "raw": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\""
+ "value": "\\u{20BB7}\\u{91CE}\\u{5BB6}",
+ "extra": {
+ "raw": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"",
+ "rawValue": "\\u{20BB7}\\u{91CE}\\u{5BB6}"
+ }
}
}
]
- },
- "comments": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/227/expected.json b/test/fixtures/harmony/uncategorised/227/expected.json
new file mode 100644
index 0000000000..df800e90dc
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/227/expected.json
@@ -0,0 +1,295 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 14,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "name": "hello"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
+ "end": 59,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 59
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 32,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 57
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 33,
+ "end": 55,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 55
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 35,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "name": "i"
+ },
+ "value": {
+ "type": "NumberLiteral",
+ "start": 38,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 38
+ },
+ "end": {
+ "line": 1,
+ "column": 40
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 42,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "s"
+ },
+ "kind": "init",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 43,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 43
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 44,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 44
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 50,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 50
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 18,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 18,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/228/expected.json b/test/fixtures/harmony/uncategorised/228/expected.json
new file mode 100644
index 0000000000..ce7968931a
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/228/expected.json
@@ -0,0 +1,258 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 0,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "a"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 13,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 49
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 29,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 47
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 30,
+ "end": 45,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 45
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 32,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "b"
+ },
+ "kind": "init",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 33,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 33
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 34,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "name": "t"
+ },
+ {
+ "type": "Identifier",
+ "start": 37,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 37
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "name": "t"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 40,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ }
+ ],
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 15,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/242/expected.json b/test/fixtures/harmony/uncategorised/242/expected.json
new file mode 100644
index 0000000000..49f6398459
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/242/expected.json
@@ -0,0 +1,169 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "AssignmentPattern",
+ "start": 15,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "eval"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 22,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 29,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 29
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/243/expected.json b/test/fixtures/harmony/uncategorised/243/expected.json
new file mode 100644
index 0000000000..56900a141d
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/243/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 18
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 22,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 22
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/244/expected.json b/test/fixtures/harmony/uncategorised/244/expected.json
new file mode 100644
index 0000000000..3382211829
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/244/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "name": "arguments"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/245/expected.json b/test/fixtures/harmony/uncategorised/245/expected.json
new file mode 100644
index 0000000000..c06f39c9f0
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/245/expected.json
@@ -0,0 +1,152 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "eval"
+ },
+ {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 27,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/246/expected.json b/test/fixtures/harmony/uncategorised/246/expected.json
new file mode 100644
index 0000000000..39df05159f
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/246/expected.json
@@ -0,0 +1,152 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "arguments"
+ },
+ {
+ "type": "Identifier",
+ "start": 26,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 32,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/247/expected.json b/test/fixtures/harmony/uncategorised/247/expected.json
new file mode 100644
index 0000000000..ab7e964fd0
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/247/expected.json
@@ -0,0 +1,185 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "eval"
+ },
+ {
+ "type": "AssignmentPattern",
+ "start": 21,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "a"
+ },
+ "right": {
+ "type": "NumberLiteral",
+ "start": 25,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ },
+ "value": 10,
+ "rawValue": 10,
+ "raw": "10"
+ }
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 32,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/249/expected.json b/test/fixtures/harmony/uncategorised/249/expected.json
new file mode 100644
index 0000000000..154fb56eab
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/249/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 16,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 16
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 21,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "value": 0,
+ "rawValue": 0,
+ "raw": "00"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/256/expected.json b/test/fixtures/harmony/uncategorised/256/expected.json
index 836f9f66a5..04ca39f3c8 100644
--- a/test/fixtures/harmony/uncategorised/256/expected.json
+++ b/test/fixtures/harmony/uncategorised/256/expected.json
@@ -74,7 +74,7 @@
},
"operator": "*",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 7,
"end": 9,
"loc": {
@@ -87,13 +87,15 @@
"column": 9
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/257/expected.json b/test/fixtures/harmony/uncategorised/257/expected.json
index 4c98e444eb..e424fec694 100644
--- a/test/fixtures/harmony/uncategorised/257/expected.json
+++ b/test/fixtures/harmony/uncategorised/257/expected.json
@@ -109,7 +109,7 @@
},
"operator": "*",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 14,
"loc": {
@@ -122,14 +122,16 @@
"column": 14
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/259/expected.json b/test/fixtures/harmony/uncategorised/259/expected.json
index 0a6392a4fb..8dbb933a6c 100644
--- a/test/fixtures/harmony/uncategorised/259/expected.json
+++ b/test/fixtures/harmony/uncategorised/259/expected.json
@@ -121,7 +121,7 @@
},
"operator": "*",
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 22,
"end": 24,
"loc": {
@@ -134,18 +134,23 @@
"column": 24
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/26/expected.json b/test/fixtures/harmony/uncategorised/26/expected.json
index a3d1a0b6eb..c14ff21a76 100644
--- a/test/fixtures/harmony/uncategorised/26/expected.json
+++ b/test/fixtures/harmony/uncategorised/26/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 9,
"end": 19,
"loc": {
@@ -121,7 +121,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 13,
"end": 18,
"loc": {
@@ -154,7 +154,7 @@
"name": "y"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 16,
"end": 18,
"loc": {
@@ -167,15 +167,15 @@
"column": 18
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
+ }
}
]
- },
- "kind": "init"
+ }
}
]
},
@@ -242,7 +242,7 @@
}
},
"argument": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 53,
"end": 54,
"loc": {
@@ -255,12 +255,15 @@
"column": 54
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
- ]
+ ],
+ "directives": []
}
}
],
@@ -372,6 +375,7 @@
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/269/actual.js b/test/fixtures/harmony/uncategorised/269/actual.js
deleted file mode 100644
index 30922446bc..0000000000
--- a/test/fixtures/harmony/uncategorised/269/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-[for (let x of []) x]
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/269/options.json b/test/fixtures/harmony/uncategorised/269/options.json
deleted file mode 100644
index f271f6ed7a..0000000000
--- a/test/fixtures/harmony/uncategorised/269/options.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "features": {
- "es7.comprehensions": true
- },
- "throws": "Unexpected token (1:6)"
-}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/27/expected.json b/test/fixtures/harmony/uncategorised/27/expected.json
index e66752bc00..2d90f27140 100644
--- a/test/fixtures/harmony/uncategorised/27/expected.json
+++ b/test/fixtures/harmony/uncategorised/27/expected.json
@@ -120,7 +120,7 @@
"name": "t"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 35,
"end": 37,
"loc": {
@@ -133,9 +133,11 @@
"column": 37
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
],
@@ -159,7 +161,7 @@
}
],
"test": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 23,
"end": 25,
"loc": {
@@ -172,14 +174,16 @@
"column": 25
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
]
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/270/actual.js b/test/fixtures/harmony/uncategorised/270/actual.js
deleted file mode 100644
index b2b34f814d..0000000000
--- a/test/fixtures/harmony/uncategorised/270/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-[for (const x of []) x]
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/270/options.json b/test/fixtures/harmony/uncategorised/270/options.json
deleted file mode 100644
index f271f6ed7a..0000000000
--- a/test/fixtures/harmony/uncategorised/270/options.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "features": {
- "es7.comprehensions": true
- },
- "throws": "Unexpected token (1:6)"
-}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/271/actual.js b/test/fixtures/harmony/uncategorised/271/actual.js
deleted file mode 100644
index d4887f4769..0000000000
--- a/test/fixtures/harmony/uncategorised/271/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-[for (var x of []) x]
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/271/options.json b/test/fixtures/harmony/uncategorised/271/options.json
deleted file mode 100644
index f271f6ed7a..0000000000
--- a/test/fixtures/harmony/uncategorised/271/options.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "features": {
- "es7.comprehensions": true
- },
- "throws": "Unexpected token (1:6)"
-}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/272/actual.js b/test/fixtures/harmony/uncategorised/272/actual.js
deleted file mode 100644
index d34bafa125..0000000000
--- a/test/fixtures/harmony/uncategorised/272/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-[for (a in []) x] // (a,b)
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/272/options.json b/test/fixtures/harmony/uncategorised/272/options.json
deleted file mode 100644
index cd9f37a180..0000000000
--- a/test/fixtures/harmony/uncategorised/272/options.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "features": {
- "es7.comprehensions": true
- },
- "throws": "Unexpected token (1:8)"
-}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/274/actual.js b/test/fixtures/harmony/uncategorised/274/actual.js
deleted file mode 100644
index 3ea1a6eee6..0000000000
--- a/test/fixtures/harmony/uncategorised/274/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-[for (x of [])] // no expression
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/274/options.json b/test/fixtures/harmony/uncategorised/274/options.json
deleted file mode 100644
index cbddd68bb9..0000000000
--- a/test/fixtures/harmony/uncategorised/274/options.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "features": {
- "es7.comprehensions": true
- },
- "throws": "Unexpected token (1:14)"
-}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/28/expected.json b/test/fixtures/harmony/uncategorised/28/expected.json
index e05229464f..6b22652418 100644
--- a/test/fixtures/harmony/uncategorised/28/expected.json
+++ b/test/fixtures/harmony/uncategorised/28/expected.json
@@ -61,7 +61,7 @@
"expression": true,
"params": [],
"body": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 6,
"end": 12,
"loc": {
@@ -74,13 +74,15 @@
"column": 12
}
},
- "value": "test",
- "rawValue": "test",
- "raw": "\"test\""
+ "extra": {
+ "rawValue": "test",
+ "raw": "\"test\""
+ },
+ "value": "test"
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/280/expected.json b/test/fixtures/harmony/uncategorised/280/expected.json
new file mode 100644
index 0000000000..a001a84bd3
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/280/expected.json
@@ -0,0 +1,203 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "x"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 25,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "name": "a"
+ },
+ {
+ "type": "ObjectPattern",
+ "start": 28,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 28
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "a"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 34,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 36
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/281/expected.json b/test/fixtures/harmony/uncategorised/281/expected.json
new file mode 100644
index 0000000000..8976155772
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/281/expected.json
@@ -0,0 +1,376 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "FunctionDeclaration",
+ "start": 14,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "name": "x"
+ },
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "ObjectPattern",
+ "start": 25,
+ "end": 37,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 37
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 27,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 27,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "name": "b"
+ },
+ "value": {
+ "type": "ObjectPattern",
+ "start": 30,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 30
+ },
+ "end": {
+ "line": 1,
+ "column": 35
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "a"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 33
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ },
+ "kind": "init"
+ }
+ ]
+ },
+ {
+ "type": "ArrayPattern",
+ "start": 39,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 39
+ },
+ "end": {
+ "line": 1,
+ "column": 53
+ }
+ },
+ "elements": [
+ {
+ "type": "ObjectPattern",
+ "start": 40,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 40
+ },
+ "end": {
+ "line": 1,
+ "column": 52
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 42,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 1,
+ "column": 43
+ }
+ },
+ "name": "b"
+ },
+ "value": {
+ "type": "ObjectPattern",
+ "start": 45,
+ "end": 50,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 45
+ },
+ "end": {
+ "line": 1,
+ "column": 50
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "name": "a"
+ },
+ "kind": "init",
+ "value": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 47
+ },
+ "end": {
+ "line": 1,
+ "column": 48
+ }
+ },
+ "name": "a"
+ }
+ }
+ ]
+ },
+ "kind": "init"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 54,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 54
+ },
+ "end": {
+ "line": 1,
+ "column": 56
+ }
+ },
+ "body": [],
+ "directives": []
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/282/actual.js b/test/fixtures/harmony/uncategorised/282/actual.js
deleted file mode 100644
index 9449b67d82..0000000000
--- a/test/fixtures/harmony/uncategorised/282/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict"; function x(a, ...[a]){}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/282/options.json b/test/fixtures/harmony/uncategorised/282/options.json
deleted file mode 100644
index 6adffc0f53..0000000000
--- a/test/fixtures/harmony/uncategorised/282/options.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "throws": "Argument name clash in strict mode (1:32)"
-}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/286/options.json b/test/fixtures/harmony/uncategorised/286/options.json
index 515b971673..27a7b64d71 100644
--- a/test/fixtures/harmony/uncategorised/286/options.json
+++ b/test/fixtures/harmony/uncategorised/286/options.json
@@ -1,3 +1,3 @@
{
- "throws": "Unexpected token (1:6)"
-}
\ No newline at end of file
+ "throws": "Unexpected token (1:4)"
+}
diff --git a/test/fixtures/harmony/uncategorised/289/expected.json b/test/fixtures/harmony/uncategorised/289/expected.json
new file mode 100644
index 0000000000..6db69cefb7
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/289/expected.json
@@ -0,0 +1,187 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "ObjectExpression",
+ "start": 1,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 3,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "method": true,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 3,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 3
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "t"
+ },
+ "kind": "init",
+ "value": {
+ "type": "FunctionExpression",
+ "start": 4,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 5,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 11,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 11
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 13,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 13,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "parenthesizedExpression": true
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/29/expected.json b/test/fixtures/harmony/uncategorised/29/expected.json
index 59c25b25cd..070478ffa3 100644
--- a/test/fixtures/harmony/uncategorised/29/expected.json
+++ b/test/fixtures/harmony/uncategorised/29/expected.json
@@ -78,7 +78,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 5,
"end": 11,
"loc": {
@@ -91,13 +91,15 @@
"column": 11
}
},
- "value": "test",
- "rawValue": "test",
- "raw": "\"test\""
+ "extra": {
+ "rawValue": "test",
+ "raw": "\"test\""
+ },
+ "value": "test"
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/296/expected.json b/test/fixtures/harmony/uncategorised/296/expected.json
new file mode 100644
index 0000000000..c444d65091
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/296/expected.json
@@ -0,0 +1,136 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 14,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": true,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 15,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "NumberLiteral",
+ "start": 24,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 24
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "\"use strict\"",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/297/expected.json b/test/fixtures/harmony/uncategorised/297/expected.json
new file mode 100644
index 0000000000..338190dde1
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/297/expected.json
@@ -0,0 +1,167 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "expression": {
+ "type": "ArrowFunctionExpression",
+ "start": 0,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 1,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "name": "eval"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 10,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 12,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 12,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 24
+ }
+ },
+ "value": "use strict",
+ "rawValue": "use strict",
+ "raw": "\"use strict\""
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 26,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 26,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 28
+ }
+ },
+ "value": 42,
+ "rawValue": 42,
+ "raw": "42"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/3/expected.json b/test/fixtures/harmony/uncategorised/3/expected.json
index f5ca6c6f39..bcf619d9dd 100644
--- a/test/fixtures/harmony/uncategorised/3/expected.json
+++ b/test/fixtures/harmony/uncategorised/3/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 2,
"loc": {
@@ -56,12 +56,14 @@
"column": 2
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "00"
+ "extra": {
+ "rawValue": 0,
+ "raw": "00"
+ },
+ "value": 0
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/30/expected.json b/test/fixtures/harmony/uncategorised/30/expected.json
index b0d9fc44f3..71885e218e 100644
--- a/test/fixtures/harmony/uncategorised/30/expected.json
+++ b/test/fixtures/harmony/uncategorised/30/expected.json
@@ -78,7 +78,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 7,
"end": 13,
"loc": {
@@ -91,13 +91,15 @@
"column": 13
}
},
- "value": "test",
- "rawValue": "test",
- "raw": "\"test\""
+ "extra": {
+ "rawValue": "test",
+ "raw": "\"test\""
+ },
+ "value": "test"
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/300/expected.json b/test/fixtures/harmony/uncategorised/300/expected.json
index c19f8b6668..5cdf1b449d 100644
--- a/test/fixtures/harmony/uncategorised/300/expected.json
+++ b/test/fixtures/harmony/uncategorised/300/expected.json
@@ -108,7 +108,7 @@
"name": "y"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 23,
"end": 25,
"loc": {
@@ -121,9 +121,11 @@
"column": 25
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
],
@@ -141,9 +143,11 @@
"column": 29
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/301/expected.json b/test/fixtures/harmony/uncategorised/301/expected.json
index 748f7b6f7d..2e575ba5c1 100644
--- a/test/fixtures/harmony/uncategorised/301/expected.json
+++ b/test/fixtures/harmony/uncategorised/301/expected.json
@@ -107,7 +107,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 26,
"end": 31,
"loc": {
@@ -120,11 +120,14 @@
"column": 31
}
},
- "value": "baz",
- "rawValue": "baz",
- "raw": "'baz'"
+ "extra": {
+ "rawValue": "baz",
+ "raw": "'baz'"
+ },
+ "value": "baz"
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/303/expected.json b/test/fixtures/harmony/uncategorised/303/expected.json
index c58193f339..64493bca6c 100644
--- a/test/fixtures/harmony/uncategorised/303/expected.json
+++ b/test/fixtures/harmony/uncategorised/303/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 8,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "get"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 5,
@@ -145,6 +144,7 @@
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/304/expected.json b/test/fixtures/harmony/uncategorised/304/expected.json
index 8fb4b5b979..b66e1b6640 100644
--- a/test/fixtures/harmony/uncategorised/304/expected.json
+++ b/test/fixtures/harmony/uncategorised/304/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 38,
"loc": {
@@ -151,8 +151,7 @@
},
"name": "defaultValue"
}
- },
- "kind": "init"
+ }
}
]
},
@@ -176,7 +175,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/305/expected.json b/test/fixtures/harmony/uncategorised/305/expected.json
index a47eedc258..07fa4a6986 100644
--- a/test/fixtures/harmony/uncategorised/305/expected.json
+++ b/test/fixtures/harmony/uncategorised/305/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 28,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "propName"
},
- "kind": "init",
"value": {
"type": "AssignmentPattern",
"start": 5,
@@ -176,7 +175,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/307/expected.json b/test/fixtures/harmony/uncategorised/307/expected.json
index 1fca349af8..66529d6cc5 100644
--- a/test/fixtures/harmony/uncategorised/307/expected.json
+++ b/test/fixtures/harmony/uncategorised/307/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 2,
"end": 7,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "AssignmentPattern",
"start": 2,
@@ -137,7 +136,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 7,
"loc": {
@@ -150,9 +149,11 @@
"column": 7
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
}
}
@@ -174,10 +175,12 @@
},
"name": "obj"
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/308/expected.json b/test/fixtures/harmony/uncategorised/308/expected.json
index dcfb5844b9..0b996626b8 100644
--- a/test/fixtures/harmony/uncategorised/308/expected.json
+++ b/test/fixtures/harmony/uncategorised/308/expected.json
@@ -76,7 +76,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 2,
"end": 7,
"loc": {
@@ -108,7 +108,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "AssignmentPattern",
"start": 2,
@@ -140,7 +139,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 6,
"end": 7,
"loc": {
@@ -153,9 +152,11 @@
"column": 7
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
}
}
@@ -180,7 +181,7 @@
}
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/309/expected.json b/test/fixtures/harmony/uncategorised/309/expected.json
index 274eb057e7..a5c0d5db68 100644
--- a/test/fixtures/harmony/uncategorised/309/expected.json
+++ b/test/fixtures/harmony/uncategorised/309/expected.json
@@ -104,7 +104,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 15,
"loc": {
@@ -152,7 +152,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 9,
"end": 14,
"loc": {
@@ -184,7 +184,6 @@
},
"name": "c"
},
- "kind": "init",
"value": {
"type": "AssignmentPattern",
"start": 9,
@@ -216,7 +215,7 @@
"name": "c"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 13,
"end": 14,
"loc": {
@@ -229,15 +228,16 @@
"column": 14
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
}
]
- },
- "kind": "init"
+ }
}
]
}
@@ -261,7 +261,7 @@
}
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/31/expected.json b/test/fixtures/harmony/uncategorised/31/expected.json
index b53fa03e5e..57366e881f 100644
--- a/test/fixtures/harmony/uncategorised/31/expected.json
+++ b/test/fixtures/harmony/uncategorised/31/expected.json
@@ -94,7 +94,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 10,
"end": 16,
"loc": {
@@ -107,13 +107,15 @@
"column": 16
}
},
- "value": "test",
- "rawValue": "test",
- "raw": "\"test\""
+ "extra": {
+ "rawValue": "test",
+ "raw": "\"test\""
+ },
+ "value": "test"
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/310/expected.json b/test/fixtures/harmony/uncategorised/310/expected.json
index 6b94dc1312..d58ddf8b31 100644
--- a/test/fixtures/harmony/uncategorised/310/expected.json
+++ b/test/fixtures/harmony/uncategorised/310/expected.json
@@ -58,7 +58,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 11,
"loc": {
@@ -90,7 +90,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "AssignmentPattern",
"start": 6,
@@ -122,7 +121,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 11,
"loc": {
@@ -135,9 +134,11 @@
"column": 11
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
}
}
@@ -175,7 +176,7 @@
}
}
}
- ]
- },
- "comments": []
-}
+ ],
+ "directives": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/313/expected.json b/test/fixtures/harmony/uncategorised/313/expected.json
index d56fc1ce39..9a9139b799 100644
--- a/test/fixtures/harmony/uncategorised/313/expected.json
+++ b/test/fixtures/harmony/uncategorised/313/expected.json
@@ -56,7 +56,8 @@
"column": 6
}
},
- "body": []
+ "body": [],
+ "directives": []
},
"handler": {
"type": "CatchClause",
@@ -88,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 15,
"end": 22,
"loc": {
@@ -120,7 +121,6 @@
},
"name": "message"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 15,
@@ -154,13 +154,14 @@
"column": 27
}
},
- "body": []
+ "body": [],
+ "directives": []
}
},
"guardedHandlers": [],
"finalizer": null
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/314/expected.json b/test/fixtures/harmony/uncategorised/314/expected.json
index 251b838ffe..859c4a7b48 100644
--- a/test/fixtures/harmony/uncategorised/314/expected.json
+++ b/test/fixtures/harmony/uncategorised/314/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 21,
"loc": {
@@ -107,46 +107,32 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 16,
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
"end": 21,
"loc": {
"start": {
"line": 1,
- "column": 16
+ "column": 19
},
"end": {
"line": 1,
"column": 21
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 19,
- "end": 21,
- "loc": {
- "start": {
- "line": 1,
- "column": 19
- },
- "end": {
- "line": 1,
- "column": 21
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/316/expected.json b/test/fixtures/harmony/uncategorised/316/expected.json
index d0a93d30d0..ec67c88b06 100644
--- a/test/fixtures/harmony/uncategorised/316/expected.json
+++ b/test/fixtures/harmony/uncategorised/316/expected.json
@@ -75,7 +75,7 @@
},
"body": [
{
- "type": "MethodDefinition",
+ "type": "ClassMethod",
"start": 10,
"end": 22,
"loc": {
@@ -107,46 +107,32 @@
},
"static": false,
"kind": "method",
- "value": {
- "type": "FunctionExpression",
- "start": 17,
+ "id": null,
+ "generator": true,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 20,
"end": 22,
"loc": {
"start": {
"line": 1,
- "column": 17
+ "column": 20
},
"end": {
"line": 1,
"column": 22
}
},
- "id": null,
- "generator": true,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 20,
- "end": 22,
- "loc": {
- "start": {
- "line": 1,
- "column": 20
- },
- "end": {
- "line": 1,
- "column": 22
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/317/expected.json b/test/fixtures/harmony/uncategorised/317/expected.json
index a39ad7b107..69257a35a5 100644
--- a/test/fixtures/harmony/uncategorised/317/expected.json
+++ b/test/fixtures/harmony/uncategorised/317/expected.json
@@ -100,7 +100,7 @@
}
},
"object": {
- "type": "Literal",
+ "type": "RegexLiteral",
"start": 3,
"end": 7,
"loc": {
@@ -113,11 +113,11 @@
"column": 7
}
},
- "raw": "/\\d/",
- "regex": {
- "pattern": "\\d",
- "flags": ""
- }
+ "extra": {
+ "raw": "/\\d/"
+ },
+ "pattern": "\\d",
+ "flags": ""
},
"property": {
"type": "Identifier",
@@ -139,7 +139,7 @@
},
"arguments": [
{
- "type": "Literal",
+ "type": "StringLiteral",
"start": 13,
"end": 16,
"loc": {
@@ -152,14 +152,16 @@
"column": 16
}
},
- "value": "1",
- "rawValue": "1",
- "raw": "'1'"
+ "extra": {
+ "rawValue": "1",
+ "raw": "'1'"
+ },
+ "value": "1"
}
]
},
"property": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 18,
"end": 19,
"loc": {
@@ -172,9 +174,11 @@
"column": 19
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
},
"computed": true
}
@@ -223,6 +227,7 @@
]
}
}
- ]
+ ],
+ "directives": []
}
-}
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/318/expected.json b/test/fixtures/harmony/uncategorised/318/expected.json
index 76c700c7ee..becd7dd80d 100644
--- a/test/fixtures/harmony/uncategorised/318/expected.json
+++ b/test/fixtures/harmony/uncategorised/318/expected.json
@@ -74,7 +74,7 @@
"name": "_𐒦"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 12,
"loc": {
@@ -87,14 +87,17 @@
"column": 12
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/319/expected.json b/test/fixtures/harmony/uncategorised/319/expected.json
index 15bd7d71f1..63f3b5c58b 100644
--- a/test/fixtures/harmony/uncategorised/319/expected.json
+++ b/test/fixtures/harmony/uncategorised/319/expected.json
@@ -74,7 +74,7 @@
"name": "_𐒦"
},
"init": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 17,
"end": 19,
"loc": {
@@ -87,14 +87,17 @@
"column": 19
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
],
"kind": "var"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/32/expected.json b/test/fixtures/harmony/uncategorised/32/expected.json
index 5f23cad1a9..a6acfabee4 100644
--- a/test/fixtures/harmony/uncategorised/32/expected.json
+++ b/test/fixtures/harmony/uncategorised/32/expected.json
@@ -107,7 +107,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 7,
"end": 9,
"loc": {
@@ -120,16 +120,19 @@
"column": 9
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
- ]
+ ],
+ "directives": []
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/320/expected.json b/test/fixtures/harmony/uncategorised/320/expected.json
index 45a5aee6ba..95f406a78c 100644
--- a/test/fixtures/harmony/uncategorised/320/expected.json
+++ b/test/fixtures/harmony/uncategorised/320/expected.json
@@ -106,7 +106,7 @@
},
"elements": [
{
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 13,
"loc": {
@@ -119,9 +119,11 @@
"column": 13
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
]
}
@@ -129,6 +131,7 @@
],
"kind": "let"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/321/expected.json b/test/fixtures/harmony/uncategorised/321/expected.json
index 6b9c75753f..304fea8a0d 100644
--- a/test/fixtures/harmony/uncategorised/321/expected.json
+++ b/test/fixtures/harmony/uncategorised/321/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 6,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "x"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 5,
@@ -145,6 +144,7 @@
],
"kind": "let"
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/322/expected.json b/test/fixtures/harmony/uncategorised/322/expected.json
index 6f01dc81ea..c3bfc6c465 100644
--- a/test/fixtures/harmony/uncategorised/322/expected.json
+++ b/test/fixtures/harmony/uncategorised/322/expected.json
@@ -92,7 +92,7 @@
]
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 9,
"loc": {
@@ -105,12 +105,15 @@
"column": 9
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/33/expected.json b/test/fixtures/harmony/uncategorised/33/expected.json
index 73ca4f7fdb..8025e7a342 100644
--- a/test/fixtures/harmony/uncategorised/33/expected.json
+++ b/test/fixtures/harmony/uncategorised/33/expected.json
@@ -93,7 +93,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 8,
"end": 20,
"loc": {
@@ -126,7 +126,7 @@
"name": "property"
},
"value": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 18,
"end": 20,
"loc": {
@@ -139,18 +139,21 @@
"column": 20
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
- },
- "kind": "init"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
+ }
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/332/expected.json b/test/fixtures/harmony/uncategorised/332/expected.json
new file mode 100644
index 0000000000..841701d361
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/332/expected.json
@@ -0,0 +1,162 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 14,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ArrayPattern",
+ "start": 14,
+ "end": 23,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 23
+ }
+ },
+ "elements": [
+ {
+ "type": "RestElement",
+ "start": 15,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 22
+ }
+ },
+ "name": "eval"
+ }
+ }
+ ]
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 26,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "name": "arr"
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/333/expected.json b/test/fixtures/harmony/uncategorised/333/expected.json
new file mode 100644
index 0000000000..beb769433c
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/333/expected.json
@@ -0,0 +1,216 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 14,
+ "end": 39,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 14
+ },
+ "end": {
+ "line": 1,
+ "column": 39
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 15,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ObjectPattern",
+ "start": 15,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "properties": [
+ {
+ "type": "Property",
+ "start": 16,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "eval"
+ },
+ "kind": "init",
+ "value": {
+ "type": "AssignmentPattern",
+ "start": 16,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "left": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 20
+ }
+ },
+ "name": "eval"
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 23,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 23
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "name": "defValue"
+ }
+ }
+ }
+ ]
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 38,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 35
+ },
+ "end": {
+ "line": 1,
+ "column": 38
+ }
+ },
+ "name": "obj"
+ },
+ "extra": {
+ "parenthesized": true
+ }
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 0,
+ "end": 13,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 13
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "raw": "'use strict'",
+ "value": "use strict"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/334/expected.json b/test/fixtures/harmony/uncategorised/334/expected.json
new file mode 100644
index 0000000000..7b7e0ac66d
--- /dev/null
+++ b/test/fixtures/harmony/uncategorised/334/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "sourceType": "module",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 0,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "ArrayPattern",
+ "start": 0,
+ "end": 9,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "elements": [
+ {
+ "type": "RestElement",
+ "start": 1,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "argument": {
+ "type": "Identifier",
+ "start": 4,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "eval"
+ }
+ }
+ ]
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 12,
+ "end": 15,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 12
+ },
+ "end": {
+ "line": 1,
+ "column": 15
+ }
+ },
+ "name": "arr"
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/338/expected.json b/test/fixtures/harmony/uncategorised/338/expected.json
index 4df49d304a..909735dfe5 100644
--- a/test/fixtures/harmony/uncategorised/338/expected.json
+++ b/test/fixtures/harmony/uncategorised/338/expected.json
@@ -89,7 +89,8 @@
"column": 32
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
},
@@ -108,7 +109,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 33,
"end": 38,
"loc": {
@@ -121,11 +122,10 @@
"column": 38
}
},
- "value": false,
- "rawValue": false,
- "raw": "false"
+ "value": false
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/34/expected.json b/test/fixtures/harmony/uncategorised/34/expected.json
index 959082456b..fe17cfad68 100644
--- a/test/fixtures/harmony/uncategorised/34/expected.json
+++ b/test/fixtures/harmony/uncategorised/34/expected.json
@@ -121,7 +121,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 14,
"end": 16,
"loc": {
@@ -134,9 +134,11 @@
"column": 16
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
},
"label": {
@@ -156,11 +158,12 @@
"name": "label"
}
}
- ]
+ ],
+ "directives": []
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/347/options.json b/test/fixtures/harmony/uncategorised/347/options.json
index 1cddead191..739bda889b 100644
--- a/test/fixtures/harmony/uncategorised/347/options.json
+++ b/test/fixtures/harmony/uncategorised/347/options.json
@@ -1,3 +1,3 @@
{
- "throws": "setter should have exactly one param (1:18)"
-}
\ No newline at end of file
+ "throws": "setter should have exactly one param (1:10)"
+}
diff --git a/test/fixtures/harmony/uncategorised/35/expected.json b/test/fixtures/harmony/uncategorised/35/expected.json
index 484d42d231..59f0dbf100 100644
--- a/test/fixtures/harmony/uncategorised/35/expected.json
+++ b/test/fixtures/harmony/uncategorised/35/expected.json
@@ -123,7 +123,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 12,
"end": 14,
"loc": {
@@ -136,16 +136,19 @@
"column": 14
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
- ]
+ ],
+ "directives": []
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/36/expected.json b/test/fixtures/harmony/uncategorised/36/expected.json
index bde5188bf8..d9a7158baa 100644
--- a/test/fixtures/harmony/uncategorised/36/expected.json
+++ b/test/fixtures/harmony/uncategorised/36/expected.json
@@ -112,7 +112,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 14,
"end": 16,
"loc": {
@@ -125,13 +125,15 @@
"column": 16
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/39/expected.json b/test/fixtures/harmony/uncategorised/39/expected.json
index ad9e441cca..1d3eb7338f 100644
--- a/test/fixtures/harmony/uncategorised/39/expected.json
+++ b/test/fixtures/harmony/uncategorised/39/expected.json
@@ -91,7 +91,7 @@
"name": "x"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 3,
"end": 4,
"loc": {
@@ -104,9 +104,11 @@
"column": 4
}
},
- "value": 1,
- "rawValue": 1,
- "raw": "1"
+ "extra": {
+ "rawValue": 1,
+ "raw": "1"
+ },
+ "value": 1
}
}
],
@@ -160,7 +162,7 @@
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/4/expected.json b/test/fixtures/harmony/uncategorised/4/expected.json
index 6288501cd1..8a021344bb 100644
--- a/test/fixtures/harmony/uncategorised/4/expected.json
+++ b/test/fixtures/harmony/uncategorised/4/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,12 +56,14 @@
"column": 3
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0o0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0o0"
+ },
+ "value": 0
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/40/expected.json b/test/fixtures/harmony/uncategorised/40/expected.json
index 61c99a2fcc..b4e861da61 100644
--- a/test/fixtures/harmony/uncategorised/40/expected.json
+++ b/test/fixtures/harmony/uncategorised/40/expected.json
@@ -78,7 +78,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -91,13 +91,15 @@
"column": 10
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/41/expected.json b/test/fixtures/harmony/uncategorised/41/expected.json
index 94171780d3..f3bbc75306 100644
--- a/test/fixtures/harmony/uncategorised/41/expected.json
+++ b/test/fixtures/harmony/uncategorised/41/expected.json
@@ -78,7 +78,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 13,
"end": 15,
"loc": {
@@ -91,13 +91,15 @@
"column": 15
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/42/expected.json b/test/fixtures/harmony/uncategorised/42/expected.json
index 657dea1e69..98652468ab 100644
--- a/test/fixtures/harmony/uncategorised/42/expected.json
+++ b/test/fixtures/harmony/uncategorised/42/expected.json
@@ -78,7 +78,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 7,
"end": 9,
"loc": {
@@ -91,13 +91,15 @@
"column": 9
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "00"
+ "extra": {
+ "rawValue": 0,
+ "raw": "00"
+ },
+ "value": 0
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/43/expected.json b/test/fixtures/harmony/uncategorised/43/expected.json
index a7af5109dd..d4be8b7577 100644
--- a/test/fixtures/harmony/uncategorised/43/expected.json
+++ b/test/fixtures/harmony/uncategorised/43/expected.json
@@ -94,7 +94,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 13,
"end": 15,
"loc": {
@@ -107,13 +107,15 @@
"column": 15
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/44/expected.json b/test/fixtures/harmony/uncategorised/44/expected.json
index f887ecd168..8a08def13e 100644
--- a/test/fixtures/harmony/uncategorised/44/expected.json
+++ b/test/fixtures/harmony/uncategorised/44/expected.json
@@ -91,7 +91,7 @@
"name": "eval"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 8,
"end": 10,
"loc": {
@@ -104,14 +104,16 @@
"column": 10
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
],
"body": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 15,
"end": 17,
"loc": {
@@ -124,13 +126,15 @@
"column": 17
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/45/expected.json b/test/fixtures/harmony/uncategorised/45/expected.json
index f45d522944..b782563eff 100644
--- a/test/fixtures/harmony/uncategorised/45/expected.json
+++ b/test/fixtures/harmony/uncategorised/45/expected.json
@@ -107,7 +107,7 @@
"name": "a"
},
"right": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 11,
"end": 13,
"loc": {
@@ -120,14 +120,16 @@
"column": 13
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "10"
+ "extra": {
+ "rawValue": 10,
+ "raw": "10"
+ },
+ "value": 10
}
}
],
"body": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 18,
"end": 20,
"loc": {
@@ -140,13 +142,15 @@
"column": 20
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/46/expected.json b/test/fixtures/harmony/uncategorised/46/expected.json
index b5b31e4fa6..b565e367ee 100644
--- a/test/fixtures/harmony/uncategorised/46/expected.json
+++ b/test/fixtures/harmony/uncategorised/46/expected.json
@@ -93,10 +93,12 @@
},
"name": "x"
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/47/expected.json b/test/fixtures/harmony/uncategorised/47/expected.json
index 3b77c8e476..3fc7b625b7 100644
--- a/test/fixtures/harmony/uncategorised/47/expected.json
+++ b/test/fixtures/harmony/uncategorised/47/expected.json
@@ -113,7 +113,7 @@
}
],
"body": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 10,
"end": 12,
"loc": {
@@ -126,14 +126,16 @@
"column": 12
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/48/expected.json b/test/fixtures/harmony/uncategorised/48/expected.json
index 463aa60586..7d5558cdaf 100644
--- a/test/fixtures/harmony/uncategorised/48/expected.json
+++ b/test/fixtures/harmony/uncategorised/48/expected.json
@@ -192,13 +192,17 @@
"name": "z"
}
],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/5/expected.json b/test/fixtures/harmony/uncategorised/5/expected.json
index e213587beb..aa7e6a2f80 100644
--- a/test/fixtures/harmony/uncategorised/5/expected.json
+++ b/test/fixtures/harmony/uncategorised/5/expected.json
@@ -76,39 +76,6 @@
}
},
"body": [
- {
- "type": "ExpressionStatement",
- "start": 17,
- "end": 30,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 30
- }
- },
- "expression": {
- "type": "Literal",
- "start": 17,
- "end": 29,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 29
- }
- },
- "value": "use strict",
- "rawValue": "use strict",
- "raw": "'use strict'"
- }
- },
{
"type": "ExpressionStatement",
"start": 31,
@@ -124,7 +91,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 31,
"end": 34,
"loc": {
@@ -137,15 +104,54 @@
"column": 34
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0o0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0o0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 17,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 17,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": "use strict",
+ "extra": {
+ "raw": "'use strict'",
+ "rawValue": "use strict"
+ }
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/51/actual.js b/test/fixtures/harmony/uncategorised/51/actual.js
deleted file mode 100644
index 1f226ec28d..0000000000
--- a/test/fixtures/harmony/uncategorised/51/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-(a, a) => 42
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/52/expected.json b/test/fixtures/harmony/uncategorised/52/expected.json
index bb2d92ab6e..880dce74c2 100644
--- a/test/fixtures/harmony/uncategorised/52/expected.json
+++ b/test/fixtures/harmony/uncategorised/52/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 18,
"loc": {
@@ -121,48 +121,34 @@
},
"name": "method"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 12,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 15,
"end": 18,
"loc": {
"start": {
"line": 1,
- "column": 12
+ "column": 15
},
"end": {
"line": 1,
"column": 18
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 15,
- "end": 18,
- "loc": {
- "start": {
- "line": 1,
- "column": 15
- },
- "end": {
- "line": 1,
- "column": 18
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/53/expected.json b/test/fixtures/harmony/uncategorised/53/expected.json
index 75665ddf61..7d5dce4954 100644
--- a/test/fixtures/harmony/uncategorised/53/expected.json
+++ b/test/fixtures/harmony/uncategorised/53/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 22,
"loc": {
@@ -121,65 +121,51 @@
},
"name": "method"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 12,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 13,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 13
+ },
+ "end": {
+ "line": 1,
+ "column": 17
+ }
+ },
+ "name": "test"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 19,
"end": 22,
"loc": {
"start": {
"line": 1,
- "column": 12
+ "column": 19
},
"end": {
"line": 1,
"column": 22
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [
- {
- "type": "Identifier",
- "start": 13,
- "end": 17,
- "loc": {
- "start": {
- "line": 1,
- "column": 13
- },
- "end": {
- "line": 1,
- "column": 17
- }
- },
- "name": "test"
- }
- ],
- "body": {
- "type": "BlockStatement",
- "start": 19,
- "end": 22,
- "loc": {
- "start": {
- "line": 1,
- "column": 19
- },
- "end": {
- "line": 1,
- "column": 22
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/54/expected.json b/test/fixtures/harmony/uncategorised/54/expected.json
index 8d4c180d13..1030bf0af2 100644
--- a/test/fixtures/harmony/uncategorised/54/expected.json
+++ b/test/fixtures/harmony/uncategorised/54/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 20,
"loc": {
@@ -106,7 +106,7 @@
"shorthand": false,
"computed": false,
"key": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 6,
"end": 14,
"loc": {
@@ -119,52 +119,40 @@
"column": 14
}
},
- "value": "method",
- "rawValue": "method",
- "raw": "'method'"
+ "extra": {
+ "rawValue": "method",
+ "raw": "'method'"
+ },
+ "value": "method"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 14,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 17,
"end": 20,
"loc": {
"start": {
"line": 1,
- "column": 14
+ "column": 17
},
"end": {
"line": 1,
"column": 20
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 17,
- "end": 20,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 20
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/55/expected.json b/test/fixtures/harmony/uncategorised/55/expected.json
index 442afea2b9..0b0d3f1c10 100644
--- a/test/fixtures/harmony/uncategorised/55/expected.json
+++ b/test/fixtures/harmony/uncategorised/55/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 15,
"loc": {
@@ -121,48 +121,34 @@
},
"name": "get"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 9,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 12,
"end": 15,
"loc": {
"start": {
"line": 1,
- "column": 9
+ "column": 12
},
"end": {
"line": 1,
"column": 15
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 12,
- "end": 15,
- "loc": {
- "start": {
- "line": 1,
- "column": 12
- },
- "end": {
- "line": 1,
- "column": 15
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/56/expected.json b/test/fixtures/harmony/uncategorised/56/expected.json
index 3545909350..b118b76443 100644
--- a/test/fixtures/harmony/uncategorised/56/expected.json
+++ b/test/fixtures/harmony/uncategorised/56/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectMethod",
"start": 6,
"end": 15,
"loc": {
@@ -121,48 +121,34 @@
},
"name": "set"
},
- "kind": "init",
- "value": {
- "type": "FunctionExpression",
- "start": 9,
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "start": 12,
"end": 15,
"loc": {
"start": {
"line": 1,
- "column": 9
+ "column": 12
},
"end": {
"line": 1,
"column": 15
}
},
- "id": null,
- "generator": false,
- "expression": false,
- "params": [],
- "body": {
- "type": "BlockStatement",
- "start": 12,
- "end": 15,
- "loc": {
- "start": {
- "line": 1,
- "column": 12
- },
- "end": {
- "line": 1,
- "column": 15
- }
- },
- "body": []
- }
+ "body": [],
+ "directives": []
}
}
]
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/57/actual.js b/test/fixtures/harmony/uncategorised/57/actual.js
deleted file mode 100644
index 7e3c6b71dc..0000000000
--- a/test/fixtures/harmony/uncategorised/57/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-[for (x of array) x]
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/57/options.json b/test/fixtures/harmony/uncategorised/57/options.json
deleted file mode 100644
index 8d84badefb..0000000000
--- a/test/fixtures/harmony/uncategorised/57/options.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "features": {
- "es7.comprehensions": true
- }
-}
diff --git a/test/fixtures/harmony/uncategorised/58/actual.js b/test/fixtures/harmony/uncategorised/58/actual.js
deleted file mode 100644
index e3fe4142ad..0000000000
--- a/test/fixtures/harmony/uncategorised/58/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-[for (x of array) for (y of array2) if (x === test) x]
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/58/options.json b/test/fixtures/harmony/uncategorised/58/options.json
deleted file mode 100644
index 8d84badefb..0000000000
--- a/test/fixtures/harmony/uncategorised/58/options.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "features": {
- "es7.comprehensions": true
- }
-}
diff --git a/test/fixtures/harmony/uncategorised/59/actual.js b/test/fixtures/harmony/uncategorised/59/actual.js
deleted file mode 100644
index 0639b61b1c..0000000000
--- a/test/fixtures/harmony/uncategorised/59/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-(for (x of array) for (y of array2) if (x === test) x)
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/59/options.json b/test/fixtures/harmony/uncategorised/59/options.json
deleted file mode 100644
index 8d84badefb..0000000000
--- a/test/fixtures/harmony/uncategorised/59/options.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "features": {
- "es7.comprehensions": true
- }
-}
diff --git a/test/fixtures/harmony/uncategorised/6/expected.json b/test/fixtures/harmony/uncategorised/6/expected.json
index 920e80aa74..118b2f32c6 100644
--- a/test/fixtures/harmony/uncategorised/6/expected.json
+++ b/test/fixtures/harmony/uncategorised/6/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,12 +56,14 @@
"column": 3
}
},
- "value": 2,
- "rawValue": 2,
- "raw": "0o2"
+ "extra": {
+ "rawValue": 2,
+ "raw": "0o2"
+ },
+ "value": 2
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/60/actual.js b/test/fixtures/harmony/uncategorised/60/actual.js
deleted file mode 100644
index f1fa787179..0000000000
--- a/test/fixtures/harmony/uncategorised/60/actual.js
+++ /dev/null
@@ -1 +0,0 @@
-[for ([,x] of array) for ({[start.x]: x, [start.y]: y} of array2) x]
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/60/expected.json b/test/fixtures/harmony/uncategorised/60/expected.json
deleted file mode 100644
index 05feccbca7..0000000000
--- a/test/fixtures/harmony/uncategorised/60/expected.json
+++ /dev/null
@@ -1,363 +0,0 @@
-{
- "type": "File",
- "start": 0,
- "end": 68,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 68
- }
- },
- "program": {
- "type": "Program",
- "start": 0,
- "end": 68,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 68
- }
- },
- "sourceType": "script",
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 0,
- "end": 68,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 68
- }
- },
- "expression": {
- "type": "ComprehensionExpression",
- "start": 0,
- "end": 68,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 1,
- "column": 68
- }
- },
- "blocks": [
- {
- "type": "ComprehensionBlock",
- "start": 1,
- "end": 20,
- "loc": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 20
- }
- },
- "left": {
- "type": "ArrayPattern",
- "start": 6,
- "end": 10,
- "loc": {
- "start": {
- "line": 1,
- "column": 6
- },
- "end": {
- "line": 1,
- "column": 10
- }
- },
- "elements": [
- null,
- {
- "type": "Identifier",
- "start": 8,
- "end": 9,
- "loc": {
- "start": {
- "line": 1,
- "column": 8
- },
- "end": {
- "line": 1,
- "column": 9
- }
- },
- "name": "x"
- }
- ]
- },
- "right": {
- "type": "Identifier",
- "start": 14,
- "end": 19,
- "loc": {
- "start": {
- "line": 1,
- "column": 14
- },
- "end": {
- "line": 1,
- "column": 19
- }
- },
- "name": "array"
- }
- },
- {
- "type": "ComprehensionBlock",
- "start": 21,
- "end": 65,
- "loc": {
- "start": {
- "line": 1,
- "column": 21
- },
- "end": {
- "line": 1,
- "column": 65
- }
- },
- "left": {
- "type": "ObjectPattern",
- "start": 26,
- "end": 54,
- "loc": {
- "start": {
- "line": 1,
- "column": 26
- },
- "end": {
- "line": 1,
- "column": 54
- }
- },
- "properties": [
- {
- "type": "Property",
- "start": 27,
- "end": 39,
- "loc": {
- "start": {
- "line": 1,
- "column": 27
- },
- "end": {
- "line": 1,
- "column": 39
- }
- },
- "method": false,
- "shorthand": false,
- "computed": true,
- "key": {
- "type": "MemberExpression",
- "start": 28,
- "end": 35,
- "loc": {
- "start": {
- "line": 1,
- "column": 28
- },
- "end": {
- "line": 1,
- "column": 35
- }
- },
- "object": {
- "type": "Identifier",
- "start": 28,
- "end": 33,
- "loc": {
- "start": {
- "line": 1,
- "column": 28
- },
- "end": {
- "line": 1,
- "column": 33
- }
- },
- "name": "start"
- },
- "property": {
- "type": "Identifier",
- "start": 34,
- "end": 35,
- "loc": {
- "start": {
- "line": 1,
- "column": 34
- },
- "end": {
- "line": 1,
- "column": 35
- }
- },
- "name": "x"
- },
- "computed": false
- },
- "value": {
- "type": "Identifier",
- "start": 38,
- "end": 39,
- "loc": {
- "start": {
- "line": 1,
- "column": 38
- },
- "end": {
- "line": 1,
- "column": 39
- }
- },
- "name": "x"
- },
- "kind": "init"
- },
- {
- "type": "Property",
- "start": 41,
- "end": 53,
- "loc": {
- "start": {
- "line": 1,
- "column": 41
- },
- "end": {
- "line": 1,
- "column": 53
- }
- },
- "method": false,
- "shorthand": false,
- "computed": true,
- "key": {
- "type": "MemberExpression",
- "start": 42,
- "end": 49,
- "loc": {
- "start": {
- "line": 1,
- "column": 42
- },
- "end": {
- "line": 1,
- "column": 49
- }
- },
- "object": {
- "type": "Identifier",
- "start": 42,
- "end": 47,
- "loc": {
- "start": {
- "line": 1,
- "column": 42
- },
- "end": {
- "line": 1,
- "column": 47
- }
- },
- "name": "start"
- },
- "property": {
- "type": "Identifier",
- "start": 48,
- "end": 49,
- "loc": {
- "start": {
- "line": 1,
- "column": 48
- },
- "end": {
- "line": 1,
- "column": 49
- }
- },
- "name": "y"
- },
- "computed": false
- },
- "value": {
- "type": "Identifier",
- "start": 52,
- "end": 53,
- "loc": {
- "start": {
- "line": 1,
- "column": 52
- },
- "end": {
- "line": 1,
- "column": 53
- }
- },
- "name": "y"
- },
- "kind": "init"
- }
- ]
- },
- "right": {
- "type": "Identifier",
- "start": 58,
- "end": 64,
- "loc": {
- "start": {
- "line": 1,
- "column": 58
- },
- "end": {
- "line": 1,
- "column": 64
- }
- },
- "name": "array2"
- }
- }
- ],
- "filter": null,
- "body": {
- "type": "Identifier",
- "start": 66,
- "end": 67,
- "loc": {
- "start": {
- "line": 1,
- "column": 66
- },
- "end": {
- "line": 1,
- "column": 67
- }
- },
- "name": "x"
- },
- "generator": false
- }
- }
- ]
- },
- "comments": []
-}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/60/options.json b/test/fixtures/harmony/uncategorised/60/options.json
deleted file mode 100644
index 8d84badefb..0000000000
--- a/test/fixtures/harmony/uncategorised/60/options.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "features": {
- "es7.comprehensions": true
- }
-}
diff --git a/test/fixtures/harmony/uncategorised/61/expected.json b/test/fixtures/harmony/uncategorised/61/expected.json
index 592ee20049..660265dd75 100644
--- a/test/fixtures/harmony/uncategorised/61/expected.json
+++ b/test/fixtures/harmony/uncategorised/61/expected.json
@@ -89,7 +89,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 6,
"end": 7,
"loc": {
@@ -121,7 +121,6 @@
},
"name": "y"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 6,
@@ -140,7 +139,7 @@
}
},
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 9,
"end": 10,
"loc": {
@@ -172,7 +171,6 @@
},
"name": "z"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 9,
@@ -194,7 +192,7 @@
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/63/expected.json b/test/fixtures/harmony/uncategorised/63/expected.json
index f8d73fc297..f17d4e7f50 100644
--- a/test/fixtures/harmony/uncategorised/63/expected.json
+++ b/test/fixtures/harmony/uncategorised/63/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 7,
"end": 8,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 7,
@@ -145,7 +144,7 @@
],
"kind": "const"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/65/expected.json b/test/fixtures/harmony/uncategorised/65/expected.json
index beb62b1d35..d449479dc0 100644
--- a/test/fixtures/harmony/uncategorised/65/expected.json
+++ b/test/fixtures/harmony/uncategorised/65/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 6,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 5,
@@ -145,7 +144,7 @@
],
"kind": "let"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/67/expected.json b/test/fixtures/harmony/uncategorised/67/expected.json
index 870ab05ccc..5847b666e3 100644
--- a/test/fixtures/harmony/uncategorised/67/expected.json
+++ b/test/fixtures/harmony/uncategorised/67/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 6,
"loc": {
@@ -105,7 +105,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 5,
@@ -145,7 +144,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/69/expected.json b/test/fixtures/harmony/uncategorised/69/expected.json
index bad27b27c6..f2577d66d0 100644
--- a/test/fixtures/harmony/uncategorised/69/expected.json
+++ b/test/fixtures/harmony/uncategorised/69/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 7,
"end": 10,
"loc": {
@@ -120,8 +120,7 @@
}
},
"name": "b"
- },
- "kind": "init"
+ }
}
]
},
@@ -145,7 +144,7 @@
],
"kind": "const"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/7/expected.json b/test/fixtures/harmony/uncategorised/7/expected.json
index 32784e3d69..5636575a62 100644
--- a/test/fixtures/harmony/uncategorised/7/expected.json
+++ b/test/fixtures/harmony/uncategorised/7/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -56,12 +56,14 @@
"column": 4
}
},
- "value": 10,
- "rawValue": 10,
- "raw": "0o12"
+ "extra": {
+ "rawValue": 10,
+ "raw": "0o12"
+ },
+ "value": 10
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/70/expected.json b/test/fixtures/harmony/uncategorised/70/expected.json
index 37cca27feb..a9efc0fea7 100644
--- a/test/fixtures/harmony/uncategorised/70/expected.json
+++ b/test/fixtures/harmony/uncategorised/70/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 8,
"loc": {
@@ -120,8 +120,7 @@
}
},
"name": "b"
- },
- "kind": "init"
+ }
}
]
},
@@ -145,7 +144,7 @@
],
"kind": "let"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/71/expected.json b/test/fixtures/harmony/uncategorised/71/expected.json
index 6a0f96a0d8..0615d247ab 100644
--- a/test/fixtures/harmony/uncategorised/71/expected.json
+++ b/test/fixtures/harmony/uncategorised/71/expected.json
@@ -73,7 +73,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 5,
"end": 8,
"loc": {
@@ -120,8 +120,7 @@
}
},
"name": "b"
- },
- "kind": "init"
+ }
}
]
},
@@ -145,7 +144,7 @@
],
"kind": "var"
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/79/expected.json b/test/fixtures/harmony/uncategorised/79/expected.json
index 5fcf2bac2b..a2c5438b1b 100644
--- a/test/fixtures/harmony/uncategorised/79/expected.json
+++ b/test/fixtures/harmony/uncategorised/79/expected.json
@@ -43,7 +43,7 @@
}
},
"declaration": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 15,
"end": 17,
"loc": {
@@ -56,12 +56,14 @@
"column": 17
}
},
- "value": 42,
- "rawValue": 42,
- "raw": "42"
+ "extra": {
+ "rawValue": 42,
+ "raw": "42"
+ },
+ "value": 42
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/8/expected.json b/test/fixtures/harmony/uncategorised/8/expected.json
index 1f7b741877..7c2c994467 100644
--- a/test/fixtures/harmony/uncategorised/8/expected.json
+++ b/test/fixtures/harmony/uncategorised/8/expected.json
@@ -43,7 +43,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 0,
"end": 3,
"loc": {
@@ -56,12 +56,14 @@
"column": 3
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0O0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0O0"
+ },
+ "value": 0
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/80/expected.json b/test/fixtures/harmony/uncategorised/80/expected.json
index 7b2bcc83bd..364e85431c 100644
--- a/test/fixtures/harmony/uncategorised/80/expected.json
+++ b/test/fixtures/harmony/uncategorised/80/expected.json
@@ -43,7 +43,7 @@
}
},
"declaration": {
- "type": "FunctionExpression",
+ "type": "FunctionDeclaration",
"start": 15,
"end": 29,
"loc": {
@@ -74,11 +74,12 @@
"column": 29
}
},
- "body": []
+ "body": [],
+ "directives": []
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/82/expected.json b/test/fixtures/harmony/uncategorised/82/expected.json
index f0b1e778eb..c6453bfd9c 100644
--- a/test/fixtures/harmony/uncategorised/82/expected.json
+++ b/test/fixtures/harmony/uncategorised/82/expected.json
@@ -43,7 +43,7 @@
}
},
"declaration": {
- "type": "ClassExpression",
+ "type": "ClassDeclaration",
"start": 15,
"end": 23,
"loc": {
@@ -76,7 +76,7 @@
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/85/expected.json b/test/fixtures/harmony/uncategorised/85/expected.json
index 0650eea051..192aa9db0f 100644
--- a/test/fixtures/harmony/uncategorised/85/expected.json
+++ b/test/fixtures/harmony/uncategorised/85/expected.json
@@ -43,7 +43,7 @@
}
},
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 14,
"end": 22,
"loc": {
@@ -56,12 +56,14 @@
"column": 22
}
},
- "value": "crypto",
- "rawValue": "crypto",
- "raw": "\"crypto\""
+ "extra": {
+ "rawValue": "crypto",
+ "raw": "\"crypto\""
+ },
+ "value": "crypto"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/9/expected.json b/test/fixtures/harmony/uncategorised/9/expected.json
index cfb1516d82..306190058c 100644
--- a/test/fixtures/harmony/uncategorised/9/expected.json
+++ b/test/fixtures/harmony/uncategorised/9/expected.json
@@ -76,39 +76,6 @@
}
},
"body": [
- {
- "type": "ExpressionStatement",
- "start": 17,
- "end": 30,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 30
- }
- },
- "expression": {
- "type": "Literal",
- "start": 17,
- "end": 29,
- "loc": {
- "start": {
- "line": 1,
- "column": 17
- },
- "end": {
- "line": 1,
- "column": 29
- }
- },
- "value": "use strict",
- "rawValue": "use strict",
- "raw": "'use strict'"
- }
- },
{
"type": "ExpressionStatement",
"start": 31,
@@ -124,7 +91,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "NumberLiteral",
"start": 31,
"end": 34,
"loc": {
@@ -137,15 +104,54 @@
"column": 34
}
},
- "value": 0,
- "rawValue": 0,
- "raw": "0O0"
+ "extra": {
+ "rawValue": 0,
+ "raw": "0O0"
+ },
+ "value": 0
+ }
+ }
+ ],
+ "directives": [
+ {
+ "type": "Directive",
+ "start": 17,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ },
+ "value": {
+ "type": "DirectiveLiteral",
+ "start": 17,
+ "end": 29,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 17
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ },
+ "value": "use strict",
+ "extra": {
+ "raw": "'use strict'",
+ "rawValue": "use strict"
+ }
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/90/expected.json b/test/fixtures/harmony/uncategorised/90/expected.json
index 49b363d4b6..2ca5064302 100644
--- a/test/fixtures/harmony/uncategorised/90/expected.json
+++ b/test/fixtures/harmony/uncategorised/90/expected.json
@@ -93,7 +93,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 24,
"end": 31,
"loc": {
@@ -106,12 +106,14 @@
"column": 31
}
},
- "value": "other",
- "rawValue": "other",
- "raw": "\"other\""
+ "extra": {
+ "rawValue": "other",
+ "raw": "\"other\""
+ },
+ "value": "other"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/91/expected.json b/test/fixtures/harmony/uncategorised/91/expected.json
index 2f38963800..c267e85d0f 100644
--- a/test/fixtures/harmony/uncategorised/91/expected.json
+++ b/test/fixtures/harmony/uncategorised/91/expected.json
@@ -44,7 +44,7 @@
},
"specifiers": [],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 7,
"end": 15,
"loc": {
@@ -57,12 +57,14 @@
"column": 15
}
},
- "value": "jquery",
- "rawValue": "jquery",
- "raw": "\"jquery\""
+ "extra": {
+ "rawValue": "jquery",
+ "raw": "\"jquery\""
+ },
+ "value": "jquery"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/92/expected.json b/test/fixtures/harmony/uncategorised/92/expected.json
index 4682d05c0c..d1465085b3 100644
--- a/test/fixtures/harmony/uncategorised/92/expected.json
+++ b/test/fixtures/harmony/uncategorised/92/expected.json
@@ -76,7 +76,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 14,
"end": 22,
"loc": {
@@ -89,12 +89,14 @@
"column": 22
}
},
- "value": "jquery",
- "rawValue": "jquery",
- "raw": "\"jquery\""
+ "extra": {
+ "rawValue": "jquery",
+ "raw": "\"jquery\""
+ },
+ "value": "jquery"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/93/expected.json b/test/fixtures/harmony/uncategorised/93/expected.json
index 082b8631eb..a6757e53fe 100644
--- a/test/fixtures/harmony/uncategorised/93/expected.json
+++ b/test/fixtures/harmony/uncategorised/93/expected.json
@@ -139,7 +139,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 33,
"end": 41,
"loc": {
@@ -152,12 +152,14 @@
"column": 41
}
},
- "value": "crypto",
- "rawValue": "crypto",
- "raw": "\"crypto\""
+ "extra": {
+ "rawValue": "crypto",
+ "raw": "\"crypto\""
+ },
+ "value": "crypto"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/94/expected.json b/test/fixtures/harmony/uncategorised/94/expected.json
index 00a9ffa137..2ab3fc92e8 100644
--- a/test/fixtures/harmony/uncategorised/94/expected.json
+++ b/test/fixtures/harmony/uncategorised/94/expected.json
@@ -92,7 +92,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 31,
"end": 39,
"loc": {
@@ -105,12 +105,14 @@
"column": 39
}
},
- "value": "crypto",
- "rawValue": "crypto",
- "raw": "\"crypto\""
+ "extra": {
+ "rawValue": "crypto",
+ "raw": "\"crypto\""
+ },
+ "value": "crypto"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/95/expected.json b/test/fixtures/harmony/uncategorised/95/expected.json
index 0d5c48622d..9b9cd83bc5 100644
--- a/test/fixtures/harmony/uncategorised/95/expected.json
+++ b/test/fixtures/harmony/uncategorised/95/expected.json
@@ -170,7 +170,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 48,
"end": 56,
"loc": {
@@ -183,12 +183,14 @@
"column": 56
}
},
- "value": "crypto",
- "rawValue": "crypto",
- "raw": "\"crypto\""
+ "extra": {
+ "rawValue": "crypto",
+ "raw": "\"crypto\""
+ },
+ "value": "crypto"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/97/expected.json b/test/fixtures/harmony/uncategorised/97/expected.json
index d5bc7664d0..378e45b83b 100644
--- a/test/fixtures/harmony/uncategorised/97/expected.json
+++ b/test/fixtures/harmony/uncategorised/97/expected.json
@@ -92,7 +92,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 28,
"end": 33,
"loc": {
@@ -105,12 +105,14 @@
"column": 33
}
},
- "value": "bar",
- "rawValue": "bar",
- "raw": "\"bar\""
+ "extra": {
+ "rawValue": "bar",
+ "raw": "\"bar\""
+ },
+ "value": "bar"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/98/expected.json b/test/fixtures/harmony/uncategorised/98/expected.json
index 1687774468..d29972d512 100644
--- a/test/fixtures/harmony/uncategorised/98/expected.json
+++ b/test/fixtures/harmony/uncategorised/98/expected.json
@@ -76,7 +76,7 @@
}
],
"source": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 24,
"end": 32,
"loc": {
@@ -89,12 +89,14 @@
"column": 32
}
},
- "value": "crypto",
- "rawValue": "crypto",
- "raw": "\"crypto\""
+ "extra": {
+ "rawValue": "crypto",
+ "raw": "\"crypto\""
+ },
+ "value": "crypto"
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/harmony/uncategorised/99/expected.json b/test/fixtures/harmony/uncategorised/99/expected.json
index 5732c1085e..0e1df863cc 100644
--- a/test/fixtures/harmony/uncategorised/99/expected.json
+++ b/test/fixtures/harmony/uncategorised/99/expected.json
@@ -122,12 +122,15 @@
}
}
}
- ]
+ ],
+ "directives": []
},
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/10/expected.json b/test/fixtures/jsx/basic/10/expected.json
index b8b912613e..74329dfd09 100644
--- a/test/fixtures/jsx/basic/10/expected.json
+++ b/test/fixtures/jsx/basic/10/expected.json
@@ -135,11 +135,7 @@
"line": 1,
"column": 27
}
- },
- "range": [
- 4,
- 27
- ]
+ }
}
]
},
@@ -160,20 +156,8 @@
},
"expression": {
"type": "JSXEmptyExpression",
- "start": 4,
- "end": 27,
- "loc": {
- "start": {
- "line": 1,
- "column": 4
- },
- "end": {
- "line": 1,
- "column": 27
- }
- },
- "leadingComments": null,
- "innerComments": [
+ "loc": {},
+ "leadingComments": [
{
"type": "CommentBlock",
"value": " this is a comment ",
@@ -188,19 +172,35 @@
"line": 1,
"column": 27
}
- },
- "range": [
- 4,
- 27
- ]
+ }
}
]
- }
+ },
+ "leadingComments": null,
+ "innerComments": [
+ {
+ "type": "CommentBlock",
+ "value": " this is a comment ",
+ "start": 4,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 4
+ },
+ "end": {
+ "line": 1,
+ "column": 27
+ }
+ }
+ }
+ ]
}
]
}
}
- ]
+ ],
+ "directives": []
},
"comments": [
{
@@ -217,11 +217,7 @@
"line": 1,
"column": 27
}
- },
- "range": [
- 4,
- 27
- ]
+ }
}
]
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/11/expected.json b/test/fixtures/jsx/basic/11/expected.json
index 032ce25604..28fdb031d2 100644
--- a/test/fixtures/jsx/basic/11/expected.json
+++ b/test/fixtures/jsx/basic/11/expected.json
@@ -122,7 +122,7 @@
},
"children": [
{
- "type": "Literal",
+ "type": "JSXText",
"start": 5,
"end": 18,
"loc": {
@@ -135,13 +135,13 @@
"column": 18
}
},
- "value": "@test content",
- "rawValue": null,
- "raw": "@test content"
+ "extra": null,
+ "value": "@test content"
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/12/expected.json b/test/fixtures/jsx/basic/12/expected.json
index 1f3d2013ac..6fd2dafebd 100644
--- a/test/fixtures/jsx/basic/12/expected.json
+++ b/test/fixtures/jsx/basic/12/expected.json
@@ -172,7 +172,7 @@
"children": []
},
{
- "type": "Literal",
+ "type": "JSXText",
"start": 11,
"end": 35,
"loc": {
@@ -185,13 +185,13 @@
"column": 35
}
},
- "value": "7x invalid-js-identifier",
- "rawValue": null,
- "raw": "7x invalid-js-identifier"
+ "extra": null,
+ "value": "7x invalid-js-identifier"
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/13/expected.json b/test/fixtures/jsx/basic/13/expected.json
index 4d358e1604..33e3801372 100644
--- a/test/fixtures/jsx/basic/13/expected.json
+++ b/test/fixtures/jsx/basic/13/expected.json
@@ -149,7 +149,8 @@
"selfClosing": true
},
"closingElement": null,
- "children": []
+ "children": [],
+ "extra": null
}
},
{
@@ -262,7 +263,7 @@
},
"children": [
{
- "type": "Literal",
+ "type": "JSXText",
"start": 31,
"end": 50,
"loc": {
@@ -275,11 +276,11 @@
"column": 50
}
},
- "value": "monkeys /> gorillas",
- "rawValue": null,
- "raw": "monkeys /> gorillas"
+ "extra": null,
+ "value": "monkeys /> gorillas"
}
- ]
+ ],
+ "extra": null
}
}
],
@@ -305,6 +306,7 @@
"children": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/16/expected.json b/test/fixtures/jsx/basic/16/expected.json
index 9e21b2e01a..d5331fba92 100644
--- a/test/fixtures/jsx/basic/16/expected.json
+++ b/test/fixtures/jsx/basic/16/expected.json
@@ -105,7 +105,9 @@
},
"closingElement": null,
"children": [],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
},
"operator": "<",
"right": {
@@ -126,7 +128,7 @@
}
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/18/expected.json b/test/fixtures/jsx/basic/18/expected.json
index d1b336d98a..643ebce2f5 100644
--- a/test/fixtures/jsx/basic/18/expected.json
+++ b/test/fixtures/jsx/basic/18/expected.json
@@ -133,7 +133,7 @@
"name": "post"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 21,
"end": 32,
"loc": {
@@ -146,9 +146,8 @@
"column": 32
}
},
- "value": "attribute",
- "rawValue": null,
- "raw": "\"attribute\""
+ "extra": null,
+ "value": "attribute"
}
}
],
@@ -174,6 +173,7 @@
"children": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/19/expected.json b/test/fixtures/jsx/basic/19/expected.json
index bce1bcea7f..e9df7bec55 100644
--- a/test/fixtures/jsx/basic/19/expected.json
+++ b/test/fixtures/jsx/basic/19/expected.json
@@ -102,7 +102,7 @@
"name": "pre"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 9,
"end": 18,
"loc": {
@@ -115,9 +115,8 @@
"column": 18
}
},
- "value": "leading",
- "rawValue": null,
- "raw": "\"leading\""
+ "extra": null,
+ "value": "leading"
}
},
{
@@ -151,7 +150,7 @@
"name": "pre2"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 24,
"end": 35,
"loc": {
@@ -164,9 +163,8 @@
"column": 35
}
},
- "value": "attribute",
- "rawValue": null,
- "raw": "\"attribute\""
+ "extra": null,
+ "value": "attribute"
}
},
{
@@ -253,6 +251,7 @@
"children": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/3/expected.json b/test/fixtures/jsx/basic/3/expected.json
index 0f475db901..a5cebe4764 100644
--- a/test/fixtures/jsx/basic/3/expected.json
+++ b/test/fixtures/jsx/basic/3/expected.json
@@ -133,7 +133,7 @@
}
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 9,
"end": 14,
"loc": {
@@ -146,9 +146,8 @@
"column": 14
}
},
- "value": "bar",
- "rawValue": null,
- "raw": "\"bar\""
+ "extra": null,
+ "value": "bar"
}
}
],
@@ -203,7 +202,7 @@
},
"children": [
{
- "type": "Literal",
+ "type": "JSXText",
"start": 15,
"end": 16,
"loc": {
@@ -216,9 +215,8 @@
"column": 16
}
},
- "value": " ",
- "rawValue": null,
- "raw": " "
+ "extra": null,
+ "value": " "
},
{
"type": "JSXExpressionContainer",
@@ -252,7 +250,7 @@
}
},
{
- "type": "Literal",
+ "type": "JSXText",
"start": 23,
"end": 24,
"loc": {
@@ -265,9 +263,8 @@
"column": 24
}
},
- "value": " ",
- "rawValue": null,
- "raw": " "
+ "extra": null,
+ "value": " "
},
{
"type": "JSXElement",
@@ -403,6 +400,7 @@
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/4/expected.json b/test/fixtures/jsx/basic/4/expected.json
index 7d7feea21e..1c24bbb736 100644
--- a/test/fixtures/jsx/basic/4/expected.json
+++ b/test/fixtures/jsx/basic/4/expected.json
@@ -116,7 +116,7 @@
}
},
"expression": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 6,
"end": 9,
"loc": {
@@ -129,9 +129,11 @@
"column": 9
}
},
- "value": " ",
- "rawValue": " ",
- "raw": "\" \""
+ "extra": {
+ "rawValue": " ",
+ "raw": "\" \""
+ },
+ "value": " "
}
}
},
@@ -166,7 +168,7 @@
"name": "c"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 13,
"end": 16,
"loc": {
@@ -179,9 +181,8 @@
"column": 16
}
},
- "value": " ",
- "rawValue": null,
- "raw": "\" \""
+ "extra": null,
+ "value": " "
}
},
{
@@ -215,7 +216,7 @@
"name": "d"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 19,
"end": 26,
"loc": {
@@ -228,9 +229,8 @@
"column": 26
}
},
- "value": "&",
- "rawValue": null,
- "raw": "\"&\""
+ "extra": null,
+ "value": "&"
}
},
{
@@ -264,7 +264,7 @@
"name": "e"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 29,
"end": 37,
"loc": {
@@ -277,9 +277,8 @@
"column": 37
}
},
- "value": "&r;",
- "rawValue": null,
- "raw": "\"&r;\""
+ "extra": null,
+ "value": "&r;"
}
}
],
@@ -305,6 +304,7 @@
"children": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/7/expected.json b/test/fixtures/jsx/basic/7/expected.json
index 86927f63d6..154626c2da 100644
--- a/test/fixtures/jsx/basic/7/expected.json
+++ b/test/fixtures/jsx/basic/7/expected.json
@@ -102,7 +102,7 @@
"name": "test"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 16,
"end": 31,
"loc": {
@@ -115,9 +115,8 @@
"column": 22
}
},
- "value": "&&",
- "rawValue": null,
- "raw": "\"&&\""
+ "extra": null,
+ "value": "&&"
}
}
],
@@ -172,7 +171,7 @@
},
"children": [
{
- "type": "Literal",
+ "type": "JSXText",
"start": 32,
"end": 41,
"loc": {
@@ -185,13 +184,13 @@
"column": 0
}
},
- "value": "\nbar\nbaz\n",
- "rawValue": null,
- "raw": "\nbar\nbaz\n"
+ "extra": null,
+ "value": "\nbar\nbaz\n"
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/9/actual.js b/test/fixtures/jsx/basic/empty-expression-container/actual.js
similarity index 100%
rename from test/fixtures/jsx/basic/9/actual.js
rename to test/fixtures/jsx/basic/empty-expression-container/actual.js
diff --git a/test/fixtures/jsx/basic/9/expected.json b/test/fixtures/jsx/basic/empty-expression-container/expected.json
similarity index 89%
rename from test/fixtures/jsx/basic/9/expected.json
rename to test/fixtures/jsx/basic/empty-expression-container/expected.json
index 3f1a13918e..157403e9bf 100644
--- a/test/fixtures/jsx/basic/9/expected.json
+++ b/test/fixtures/jsx/basic/empty-expression-container/expected.json
@@ -137,24 +137,13 @@
},
"expression": {
"type": "JSXEmptyExpression",
- "start": 4,
- "end": 4,
- "loc": {
- "start": {
- "line": 1,
- "column": 4
- },
- "end": {
- "line": 1,
- "column": 4
- }
- }
+ "loc": {}
}
}
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/keyword-tag/actual.js b/test/fixtures/jsx/basic/keyword-tag/actual.js
new file mode 100644
index 0000000000..607877f8af
--- /dev/null
+++ b/test/fixtures/jsx/basic/keyword-tag/actual.js
@@ -0,0 +1 @@
+ ;
diff --git a/test/fixtures/jsx/basic/keyword-tag/expected.json b/test/fixtures/jsx/basic/keyword-tag/expected.json
new file mode 100644
index 0000000000..310e29dd35
--- /dev/null
+++ b/test/fixtures/jsx/basic/keyword-tag/expected.json
@@ -0,0 +1,128 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "JSXElement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "openingElement": {
+ "type": "JSXOpeningElement",
+ "start": 0,
+ "end": 5,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 5
+ }
+ },
+ "attributes": [],
+ "name": {
+ "type": "JSXIdentifier",
+ "start": 1,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "var"
+ },
+ "selfClosing": false
+ },
+ "closingElement": {
+ "type": "JSXClosingElement",
+ "start": 5,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "name": {
+ "type": "JSXIdentifier",
+ "start": 7,
+ "end": 10,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "name": "var"
+ }
+ },
+ "children": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/jsx/basic/namespace-tag/actual.js b/test/fixtures/jsx/basic/namespace-tag/actual.js
new file mode 100644
index 0000000000..743369ba07
--- /dev/null
+++ b/test/fixtures/jsx/basic/namespace-tag/actual.js
@@ -0,0 +1,2 @@
+ ;
+
diff --git a/test/fixtures/jsx/basic/namespace-tag/expected.json b/test/fixtures/jsx/basic/namespace-tag/expected.json
new file mode 100644
index 0000000000..9070b5a80f
--- /dev/null
+++ b/test/fixtures/jsx/basic/namespace-tag/expected.json
@@ -0,0 +1,286 @@
+{
+ "type": "File",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "program": {
+ "type": "Program",
+ "start": 0,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "sourceType": "script",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 0,
+ "end": 12,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 12
+ }
+ },
+ "expression": {
+ "type": "JSXElement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "openingElement": {
+ "type": "JSXOpeningElement",
+ "start": 0,
+ "end": 11,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 11
+ }
+ },
+ "attributes": [],
+ "name": {
+ "type": "JSXNamespacedName",
+ "start": 1,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "namespace": {
+ "type": "JSXIdentifier",
+ "start": 1,
+ "end": 4,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 4
+ }
+ },
+ "name": "Foo"
+ },
+ "name": {
+ "type": "JSXIdentifier",
+ "start": 5,
+ "end": 8,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 5
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "name": "Bar"
+ }
+ },
+ "selfClosing": true
+ },
+ "closingElement": null,
+ "children": []
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 13,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "expression": {
+ "type": "JSXElement",
+ "start": 13,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "openingElement": {
+ "type": "JSXOpeningElement",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "attributes": [],
+ "name": {
+ "type": "JSXNamespacedName",
+ "start": 14,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "namespace": {
+ "type": "JSXIdentifier",
+ "start": 14,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "name": "Foo"
+ },
+ "name": {
+ "type": "JSXIdentifier",
+ "start": 18,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 5
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "name": "Bar"
+ }
+ },
+ "selfClosing": false
+ },
+ "closingElement": {
+ "type": "JSXClosingElement",
+ "start": 22,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "name": {
+ "type": "JSXNamespacedName",
+ "start": 24,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "namespace": {
+ "type": "JSXIdentifier",
+ "start": 24,
+ "end": 27,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "name": "Foo"
+ },
+ "name": {
+ "type": "JSXIdentifier",
+ "start": 28,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "name": "Bar"
+ }
+ }
+ },
+ "children": []
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/jsx/errors/wrong-closing-tag/actual.js b/test/fixtures/jsx/errors/wrong-closing-tag/actual.js
new file mode 100644
index 0000000000..e3cec40540
--- /dev/null
+++ b/test/fixtures/jsx/errors/wrong-closing-tag/actual.js
@@ -0,0 +1 @@
+
diff --git a/test/fixtures/jsx/errors/wrong-closing-tag/options.json b/test/fixtures/jsx/errors/wrong-closing-tag/options.json
new file mode 100644
index 0000000000..f3afda9ee9
--- /dev/null
+++ b/test/fixtures/jsx/errors/wrong-closing-tag/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "Expected corresponding JSX closing tag for (1:5)"
+}
diff --git a/test/fixtures/jsx/options.json b/test/fixtures/jsx/options.json
index 393a3c5f17..de157b98ca 100644
--- a/test/fixtures/jsx/options.json
+++ b/test/fixtures/jsx/options.json
@@ -1,3 +1,3 @@
{
- "plugins": { "jsx": true }
+ "plugins": ["jsx"]
}
diff --git a/test/fixtures/jsx/regression/1/expected.json b/test/fixtures/jsx/regression/1/expected.json
index 5a09d6bfde..568a15f9e9 100644
--- a/test/fixtures/jsx/regression/1/expected.json
+++ b/test/fixtures/jsx/regression/1/expected.json
@@ -122,7 +122,7 @@
},
"children": [
{
- "type": "Literal",
+ "type": "JSXText",
"start": 3,
"end": 7,
"loc": {
@@ -135,9 +135,8 @@
"column": 7
}
},
- "value": "foo ",
- "rawValue": null,
- "raw": "foo "
+ "extra": null,
+ "value": "foo "
},
{
"type": "JSXElement",
@@ -199,7 +198,7 @@
"name": "href"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 15,
"end": 21,
"loc": {
@@ -212,9 +211,8 @@
"column": 21
}
},
- "value": "test",
- "rawValue": null,
- "raw": "\"test\""
+ "extra": null,
+ "value": "test"
}
}
],
@@ -269,7 +267,7 @@
},
"children": [
{
- "type": "Literal",
+ "type": "JSXText",
"start": 22,
"end": 26,
"loc": {
@@ -282,14 +280,13 @@
"column": 26
}
},
- "value": " bar",
- "rawValue": null,
- "raw": " bar"
+ "extra": null,
+ "value": " bar"
}
]
},
{
- "type": "Literal",
+ "type": "JSXText",
"start": 30,
"end": 34,
"loc": {
@@ -302,13 +299,13 @@
"column": 34
}
},
- "value": " baz",
- "rawValue": null,
- "raw": " baz"
+ "extra": null,
+ "value": " baz"
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/regression/3/expected.json b/test/fixtures/jsx/regression/3/expected.json
index e12dd8c418..d4081dc212 100644
--- a/test/fixtures/jsx/regression/3/expected.json
+++ b/test/fixtures/jsx/regression/3/expected.json
@@ -151,7 +151,7 @@
},
"properties": [
{
- "type": "Property",
+ "type": "ObjectProperty",
"start": 8,
"end": 9,
"loc": {
@@ -183,7 +183,6 @@
},
"name": "a"
},
- "kind": "init",
"value": {
"type": "Identifier",
"start": 8,
@@ -207,7 +206,7 @@
]
}
}
- ]
- },
- "comments": []
+ ],
+ "directives": []
+ }
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/regression/4/expected.json b/test/fixtures/jsx/regression/4/expected.json
index f3c24eb4d5..6e86caee9b 100644
--- a/test/fixtures/jsx/regression/4/expected.json
+++ b/test/fixtures/jsx/regression/4/expected.json
@@ -122,7 +122,7 @@
},
"children": [
{
- "type": "Literal",
+ "type": "JSXText",
"start": 5,
"end": 10,
"loc": {
@@ -135,13 +135,13 @@
"column": 10
}
},
- "value": "/text",
- "rawValue": null,
- "raw": "/text"
+ "extra": null,
+ "value": "/text"
}
]
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/regression/6/expected.json b/test/fixtures/jsx/regression/6/expected.json
index dda6e404ca..44b08551ed 100644
--- a/test/fixtures/jsx/regression/6/expected.json
+++ b/test/fixtures/jsx/regression/6/expected.json
@@ -102,7 +102,7 @@
"name": "pre"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 9,
"end": 18,
"loc": {
@@ -115,9 +115,8 @@
"column": 18
}
},
- "value": "leading",
- "rawValue": null,
- "raw": "\"leading\""
+ "extra": null,
+ "value": "leading"
}
},
{
@@ -174,6 +173,7 @@
"children": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/regression/7/expected.json b/test/fixtures/jsx/regression/7/expected.json
index a37ebed7c8..d82ea9606a 100644
--- a/test/fixtures/jsx/regression/7/expected.json
+++ b/test/fixtures/jsx/regression/7/expected.json
@@ -102,7 +102,7 @@
"name": "d"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 8,
"end": 60,
"loc": {
@@ -115,9 +115,8 @@
"column": 15
}
},
- "value": "M230 80\n\t\tA 45 45, 0, 1, 0, 275 125\n L 275 80 Z",
- "rawValue": null,
- "raw": "\"M230 80\n\t\tA 45 45, 0, 1, 0, 275 125\n L 275 80 Z\""
+ "extra": null,
+ "value": "M230 80\n\t\tA 45 45, 0, 1, 0, 275 125\n L 275 80 Z"
}
}
],
@@ -143,6 +142,7 @@
"children": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/regression/issue-2083/expected.json b/test/fixtures/jsx/regression/issue-2083/expected.json
index 258d659c46..eeb0a95cc9 100644
--- a/test/fixtures/jsx/regression/issue-2083/expected.json
+++ b/test/fixtures/jsx/regression/issue-2083/expected.json
@@ -57,7 +57,7 @@
}
},
"test": {
- "type": "Literal",
+ "type": "BooleanLiteral",
"start": 0,
"end": 4,
"loc": {
@@ -70,9 +70,7 @@
"column": 4
}
},
- "value": true,
- "rawValue": true,
- "raw": "true"
+ "value": true
},
"consequent": {
"type": "JSXElement",
@@ -123,7 +121,9 @@
},
"closingElement": null,
"children": [],
- "parenthesizedExpression": true
+ "extra": {
+ "parenthesized": true
+ }
},
"alternate": {
"type": "JSXElement",
@@ -177,6 +177,7 @@
}
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/fixtures/jsx/regression/issue-2114/expected.json b/test/fixtures/jsx/regression/issue-2114/expected.json
index 9259331d8f..15b1d87259 100644
--- a/test/fixtures/jsx/regression/issue-2114/expected.json
+++ b/test/fixtures/jsx/regression/issue-2114/expected.json
@@ -102,7 +102,7 @@
"name": "pattern"
},
"value": {
- "type": "Literal",
+ "type": "StringLiteral",
"start": 13,
"end": 43,
"loc": {
@@ -115,9 +115,8 @@
"column": 43
}
},
- "value": "^([\\w\\.\\-]+\\s)*[\\w\\.\\-]+\\s?$",
- "rawValue": null,
- "raw": "\"^([\\w\\.\\-]+\\s)*[\\w\\.\\-]+\\s?$\""
+ "extra": null,
+ "value": "^([\\w\\.\\-]+\\s)*[\\w\\.\\-]+\\s?$"
}
}
],
@@ -173,6 +172,7 @@
"children": []
}
}
- ]
+ ],
+ "directives": []
}
}
\ No newline at end of file
diff --git a/test/index.js b/test/index.js
index b16648685e..0954e19df9 100644
--- a/test/index.js
+++ b/test/index.js
@@ -11,7 +11,12 @@ _.each(fixtures, function (suites, name) {
suite(name + "/" + testSuite.title, function () {
_.each(testSuite.tests, function (task) {
test(task.title, !task.disabled && function () {
- return runTest(task);
+ try {
+ return runTest(task);
+ } catch (err) {
+ err.message = task.actual.loc + ": " + err.message;
+ throw err;
+ }
});
});
});
@@ -54,7 +59,7 @@ function runTest(test) {
} else {
var mis = misMatch(JSON.parse(test.expect.code), ast);
if (mis) {
- // save(test, ast);
+ //save(test, ast);
throw new Error(mis);
}
}