From b581a7590c77dfb27fa960fc802441a779474a15 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 10 Aug 2015 13:04:08 +0100 Subject: [PATCH 01/31] fix export default function expression disambiguation - fixes #2189 --- src/parser/statement.js | 43 ++++--- .../actual.js | 2 + .../expected.json | 115 ++++++++++++++++++ .../options.json | 3 - .../options.json | 0 5 files changed, 146 insertions(+), 17 deletions(-) create mode 100644 test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/actual.js create mode 100644 test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/expected.json delete mode 100644 test/fixtures/harmony/modules/export-default-function-expression/options.json rename test/fixtures/harmony/modules/{export-default-function-declaration => }/options.json (100%) diff --git a/src/parser/statement.js b/src/parser/statement.js index 18482415f8..8a6744f8c0 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -483,11 +483,15 @@ pp.parseVarHead = function (decl) { // Parse a function declaration or literal (depending on the // `isStatement` parameter). -pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync) { +pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, optionalId) { this.initFunction(node, isAsync); node.generator = this.eat(tt.star); - if (isStatement || this.match(tt.name)) { + if (isStatement && !optionalId && !this.match(tt.name)) { + this.unexpected(); + } + + if (this.match(tt.name)) { node.id = this.parseIdent(); } @@ -504,9 +508,9 @@ pp.parseFunctionParams = function (node) { // 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(); let hadConstructor = false; @@ -607,8 +611,16 @@ pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) { classBody.body.push(this.finishNode(method, "MethodDefinition")); }; -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.parseIdent(); + } else { + if (optionalId || !isStatement) { + node.id = null; + } else { + this.unexpected(); + } + } }; pp.parseClassSuper = function (node) { @@ -648,14 +660,17 @@ pp.parseExport = function (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); + if (!expr.id) expr.type = "FunctionExpression"; + } else if (this.match(tt._class)) { + expr = this.parseClass(expr, true, true); + if (!expr.id) expr.type = "ClassExpression"; + } else { + needsSemi = true; + expr = this.parseMaybeAssign(); } node.declaration = expr; if (needsSemi) this.semicolon(); 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..c204457d46 --- /dev/null +++ b/test/fixtures/harmony/modules/export-default-function-declaration-expression-disambiguation/expected.json @@ -0,0 +1,115 @@ +{ + "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": "FunctionExpression", + "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": [] + } + } + }, + { + "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", + "parenthesizedExpression": true + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/harmony/modules/export-default-function-expression/options.json b/test/fixtures/harmony/modules/export-default-function-expression/options.json deleted file mode 100644 index 2104ca4328..0000000000 --- a/test/fixtures/harmony/modules/export-default-function-expression/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "sourceType": "module" -} diff --git a/test/fixtures/harmony/modules/export-default-function-declaration/options.json b/test/fixtures/harmony/modules/options.json similarity index 100% rename from test/fixtures/harmony/modules/export-default-function-declaration/options.json rename to test/fixtures/harmony/modules/options.json From c318c880505e96d2c1947a5543c0f11255cd18e5 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 10 Aug 2015 13:10:32 +0100 Subject: [PATCH 02/31] forward all arguments to parseClassId in flow parser plugin --- src/plugins/flow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/flow.js b/src/plugins/flow.js index 718f0f4921..07c68d55c6 100644 --- a/src/plugins/flow.js +++ b/src/plugins/flow.js @@ -703,8 +703,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(); } From df021c7f23f6017c3df687708e5aa985d34b9cdf Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 11 Aug 2015 00:59:15 +0100 Subject: [PATCH 03/31] add esprima tests and fix bugs picked up by it --- src/options.js | 5 - src/parser/expression.js | 160 +++-- src/parser/lval.js | 19 +- src/parser/statement.js | 89 ++- src/parser/util.js | 17 + src/plugins/flow.js | 64 +- .../core/uncategorised/484/expected.json | 117 ++++ .../core/uncategorised/485/expected.json | 117 ++++ .../core/uncategorised/488/expected.json | 149 +++++ .../core/uncategorised/489/expected.json | 149 +++++ .../core/uncategorised/491/expected.json | 149 +++++ .../core/uncategorised/495/expected.json | 134 +++++ .../core/uncategorised/496/expected.json | 134 +++++ .../core/uncategorised/511/expected.json | 134 +++++ .../core/uncategorised/512/expected.json | 117 ++++ .../core/uncategorised/515/expected.json | 134 +++++ .../core/uncategorised/516/expected.json | 134 +++++ .../core/uncategorised/520/expected.json | 150 +++++ .../core/uncategorised/521/expected.json | 150 +++++ .../core/uncategorised/536/expected.json | 83 +++ test/fixtures/esprima/LICENSE | 21 + .../migrated_0000/actual.js | 2 + .../migrated_0000/expected.json | 129 ++++ .../migrated_0001/actual.js | 2 + .../migrated_0001/expected.json | 129 ++++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 129 ++++ .../migrated_0003/actual.js | 2 + .../migrated_0003/expected.json | 197 ++++++ .../migrated_0004/actual.js | 2 + .../migrated_0004/expected.json | 130 ++++ .../migrated_0005/actual.js | 2 + .../migrated_0005/expected.json | 198 ++++++ .../migrated_0006/actual.js | 2 + .../migrated_0006/expected.json | 198 ++++++ .../migrated_0007/actual.js | 2 + .../migrated_0007/expected.json | 130 ++++ .../migrated_0008/actual.js | 2 + .../migrated_0008/expected.json | 198 ++++++ .../migrated_0009/actual.js | 2 + .../migrated_0009/expected.json | 198 ++++++ .../migrated_0010/actual.js | 2 + .../migrated_0010/expected.json | 132 ++++ .../migrated_0011/actual.js | 2 + .../migrated_0011/expected.json | 200 ++++++ .../migrated_0012/actual.js | 2 + .../migrated_0012/expected.json | 200 ++++++ .../migrated_0013/actual.js | 2 + .../migrated_0013/expected.json | 112 ++++ .../migrated_0014/actual.js | 2 + .../migrated_0014/expected.json | 181 ++++++ .../migrated_0015/actual.js | 2 + .../migrated_0015/expected.json | 181 ++++++ .../declaration-const/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 100 +++ .../declaration-const/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 117 ++++ .../declaration-const/migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 215 +++++++ .../declaration-function/dupe-param/actual.js | 1 + .../empty-param/actual.js | 1 + .../empty-param/expected.json | 150 +++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 131 ++++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 83 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 83 +++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 116 ++++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 132 ++++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 168 ++++++ .../migrated_0006/actual.js | 1 + .../migrated_0006/expected.json | 148 +++++ .../migrated_0007/actual.js | 1 + .../migrated_0007/expected.json | 164 +++++ .../migrated_0008/actual.js | 1 + .../migrated_0008/expected.json | 165 +++++ .../migrated_0009/actual.js | 1 + .../migrated_0009/expected.json | 132 ++++ .../migrated_0010/actual.js | 1 + .../migrated_0010/expected.json | 132 ++++ .../migrated_0011/actual.js | 1 + .../migrated_0011/expected.json | 180 ++++++ .../migrated_0012/actual.js | 1 + .../migrated_0012/expected.json | 84 +++ .../migrated_0013/actual.js | 1 + .../migrated_0013/expected.json | 100 +++ .../migrated_0014/actual.js | 1 + .../migrated_0014/expected.json | 151 +++++ .../declaration-let/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 83 +++ .../declaration-let/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 100 +++ .../declaration-let/migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 117 ++++ .../declaration-let/migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 215 +++++++ .../directive-prolog/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 180 ++++++ .../directive-prolog/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 180 ++++++ .../array-binding-pattern-01/actual.js | 1 + .../array-binding-pattern-01/expected.json | 136 +++++ .../array-binding-pattern-02/actual.js | 1 + .../array-binding-pattern-02/expected.json | 135 +++++ .../array-binding-pattern-03/actual.js | 1 + .../array-binding-pattern-03/expected.json | 150 +++++ .../array-binding-pattern-empty/actual.js | 1 + .../array-binding-pattern-empty/expected.json | 102 ++++ .../elision/actual.js | 1 + .../elision/expected.json | 105 ++++ .../invalid-dup-param/actual.js | 1 + .../invalid-dup-param/expected.json | 183 ++++++ .../invalid-dup-param/options.json | 3 + .../invalid-elision-after-rest/actual.js | 1 + .../invalid-elision-after-rest/expected.json | 150 +++++ .../invalid-elision-after-rest/options.json | 3 + .../dupe-param-1/actual.js | 2 + .../dupe-param-2/actual.js | 2 + .../dupe-param-3/actual.js | 2 + .../es2015-array-pattern/elision/actual.js | 1 + .../elision/expected.json | 117 ++++ .../empty-pattern-catch-param/actual.js | 1 + .../empty-pattern-catch-param/expected.json | 113 ++++ .../empty-pattern-fn/actual.js | 1 + .../empty-pattern-fn/expected.json | 100 +++ .../empty-pattern-lexical/actual.js | 1 + .../empty-pattern-lexical/expected.json | 98 +++ .../empty-pattern-var/actual.js | 1 + .../empty-pattern-var/expected.json | 100 +++ .../es2015-array-pattern/hole/actual.js | 1 + .../es2015-array-pattern/hole/expected.json | 134 +++++ .../nested-pattern/actual.js | 1 + .../nested-pattern/expected.json | 117 ++++ .../patterned-catch-dupe/actual.js | 1 + .../patterned-catch-dupe/expected.json | 146 +++++ .../patterned-catch-dupe/options.json | 3 + .../patterned-catch/actual.js | 1 + .../patterned-catch/expected.json | 464 ++++++++++++++ .../es2015-array-pattern/rest/actual.js | 1 + .../es2015-array-pattern/rest/expected.json | 132 ++++ .../es2015-array-pattern/rest/options.json | 3 + .../tailing-hold/actual.js | 1 + .../tailing-hold/expected.json | 118 ++++ .../with-default-catch-param-fail/actual.js | 1 + .../options.json | 3 + .../with-default-catch-param/actual.js | 1 + .../with-default-catch-param/expected.json | 163 +++++ .../with-default-fn/actual.js | 1 + .../with-default-fn/expected.json | 150 +++++ .../with-object-pattern/actual.js | 1 + .../with-object-pattern/expected.json | 169 ++++++ .../arrow-rest-forgetting-comma/actual.js | 1 + .../arrow-rest-forgetting-comma/options.json | 3 + .../actual.js | 1 + .../expected.json | 149 +++++ .../arrow-with-multiple-rest/actual.js | 1 + .../arrow-with-multiple-rest/options.json | 3 + .../arrow-with-only-rest/actual.js | 1 + .../arrow-with-only-rest/expected.json | 117 ++++ .../actual.js | 1 + .../options.json | 3 + .../invalid-duplicated-params/actual.js | 1 + .../invalid-duplicated-params/options.json | 3 + .../invalid-line-terminator-arrow/actual.js | 2 + .../options.json | 3 + .../invalid-param-strict-mode/actual.js | 1 + .../invalid-param-strict-mode/expected.json | 134 +++++ .../invalid-param-strict-mode/options.json | 3 + .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 85 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 102 ++++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 102 ++++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 118 ++++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 134 +++++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 155 +++++ .../migrated_0006/actual.js | 1 + .../migrated_0006/expected.json | 165 +++++ .../migrated_0007/actual.js | 1 + .../migrated_0007/expected.json | 150 +++++ .../migrated_0008/actual.js | 1 + .../migrated_0008/expected.json | 165 +++++ .../migrated_0009/actual.js | 1 + .../migrated_0009/expected.json | 102 ++++ .../migrated_0010/actual.js | 1 + .../migrated_0010/expected.json | 102 ++++ .../migrated_0011/actual.js | 1 + .../migrated_0011/expected.json | 102 ++++ .../migrated_0012/actual.js | 1 + .../migrated_0012/expected.json | 118 ++++ .../migrated_0013/actual.js | 1 + .../migrated_0013/expected.json | 135 +++++ .../migrated_0014/actual.js | 1 + .../migrated_0014/expected.json | 151 +++++ .../migrated_0015/actual.js | 1 + .../migrated_0015/expected.json | 101 ++++ .../migrated_0016/actual.js | 1 + .../migrated_0016/expected.json | 138 +++++ .../migrated_0017/actual.js | 1 + .../migrated_0017/expected.json | 203 +++++++ .../migrated_0018/actual.js | 1 + .../migrated_0018/expected.json | 116 ++++ .../migrated_0019/actual.js | 1 + .../migrated_0019/expected.json | 149 +++++ .../migrated_0020/actual.js | 1 + .../migrated_0020/expected.json | 100 +++ .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../object-binding-pattern/expected.json | 32 + .../invalid-member-expr.failure.json | 1 + .../invalid-member-expr.js | 1 + .../invalid-method-in-pattern.failure.json | 1 + .../invalid-method-in-pattern.js | 1 + .../invalid-nested-param.failure.json | 1 + .../invalid-nested-param.js | 1 + ...d-pattern-without-parenthesis.failure.json | 1 + .../invalid-pattern-without-parenthesis.js | 1 + ...nvalid-rest-in-object-pattern.failure.json | 1 + .../invalid-rest-in-object-pattern.js | 1 + .../nested-cover-grammar.js | 1 + .../object-binding-pattern-01.js | 1 + .../object-binding-pattern-empty.js | 1 + .../param-with-rest-without-arrow/actual.js | 1 + .../options.json | 3 + .../rest-without-arrow/actual.js | 1 + .../rest-without-arrow/options.json | 3 + .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 66 ++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 66 ++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 66 ++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 66 ++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 66 ++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 66 ++ .../es2015-class/migrated_0000/actual.js | 1 + .../es2015-class/migrated_0000/expected.json | 81 +++ .../es2015-class/migrated_0001/actual.js | 1 + .../es2015-class/migrated_0001/expected.json | 98 +++ .../es2015-class/migrated_0002/actual.js | 1 + .../es2015-class/migrated_0002/expected.json | 81 +++ .../es2015-class/migrated_0003/actual.js | 1 + .../es2015-class/migrated_0003/expected.json | 81 +++ .../es2015-class/migrated_0004/actual.js | 1 + .../es2015-class/migrated_0004/expected.json | 151 +++++ .../es2015-class/migrated_0005/actual.js | 1 + .../es2015-class/migrated_0005/expected.json | 220 +++++++ .../es2015-class/migrated_0006/actual.js | 1 + .../es2015-class/migrated_0006/expected.json | 220 +++++++ .../es2015-class/migrated_0007/actual.js | 1 + .../es2015-class/migrated_0007/expected.json | 220 +++++++ .../es2015-class/migrated_0008/actual.js | 1 + .../es2015-class/migrated_0008/expected.json | 220 +++++++ .../es2015-class/migrated_0009/actual.js | 1 + .../es2015-class/migrated_0009/expected.json | 151 +++++ .../es2015-class/migrated_0010/actual.js | 1 + .../es2015-class/migrated_0010/expected.json | 237 ++++++++ .../es2015-class/migrated_0011/actual.js | 1 + .../es2015-class/migrated_0011/expected.json | 306 ++++++++++ .../es2015-class/migrated_0012/actual.js | 1 + .../es2015-class/migrated_0012/expected.json | 151 +++++ .../es2015-class/migrated_0013/actual.js | 1 + .../es2015-class/migrated_0013/expected.json | 151 +++++ .../es2015-class/migrated_0014/actual.js | 1 + .../es2015-class/migrated_0014/expected.json | 220 +++++++ .../es2015-class/migrated_0015/actual.js | 1 + .../es2015-class/migrated_0015/expected.json | 151 +++++ .../es2015-class/migrated_0016/actual.js | 1 + .../es2015-class/migrated_0016/expected.json | 147 +++++ .../es2015-class/migrated_0017/actual.js | 1 + .../es2015-class/migrated_0017/expected.json | 151 +++++ .../es2015-class/migrated_0018/actual.js | 1 + .../es2015-class/migrated_0018/expected.json | 151 +++++ .../es2015-class/migrated_0019/actual.js | 1 + .../es2015-class/migrated_0019/expected.json | 224 +++++++ .../es2015-class/migrated_0020/actual.js | 1 + .../es2015-class/migrated_0020/expected.json | 220 +++++++ .../es2015-class/migrated_0021/actual.js | 1 + .../es2015-class/migrated_0021/expected.json | 153 +++++ .../es2015-class/migrated_0022/actual.js | 1 + .../es2015-class/migrated_0022/expected.json | 82 +++ .../es2015-class/migrated_0023/actual.js | 1 + .../es2015-class/migrated_0023/expected.json | 97 +++ .../es2015-class/migrated_0024/actual.js | 1 + .../es2015-class/migrated_0024/expected.json | 99 +++ .../es2015-class/migrated_0025/actual.js | 1 + .../es2015-class/migrated_0025/expected.json | 114 ++++ .../es2015-class/migrated_0026/actual.js | 1 + .../es2015-class/migrated_0026/expected.json | 168 ++++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 165 +++++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 133 ++++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 217 +++++++ .../dup-assignment/actual.js | 1 + .../dup-assignment/expected.json | 163 +++++ .../elision/actual.js | 1 + .../elision/expected.json | 101 ++++ .../member-expr-in-rest/actual.js | 1 + .../member-expr-in-rest/expected.json | 164 +++++ .../nested-assignment/actual.js | 1 + .../nested-assignment/expected.json | 293 +++++++++ .../nested-cover-grammar/actual.js | 1 + .../nested-cover-grammar/expected.json | 198 ++++++ .../simple-assignment/actual.js | 1 + .../simple-assignment/expected.json | 115 ++++ .../empty-object-pattern-assignment/actual.js | 1 + .../expected.json | 99 +++ .../invalid-lhs-01/actual.js | 1 + .../invalid-lhs-01/options.json | 3 + .../invalid-lhs-02/actual.js | 1 + .../invalid-lhs-02/options.json | 3 + .../invalid-pattern-with-method/actual.js | 1 + .../invalid-pattern-with-method/options.json | 3 + .../nested-cover-grammar/actual.js | 1 + .../nested-cover-grammar/expected.json | 555 +++++++++++++++++ .../object-pattern-assignment/actual.js | 8 + .../object-pattern-assignment/expected.json | 568 ++++++++++++++++++ .../invalid-cover-grammar/actual.js | 1 + .../invalid-cover-grammar/options.json | 3 + .../invalid-group-assignment/actual.js | 1 + .../invalid-group-assignment/options.json | 3 + .../export-const-number/actual.js | 1 + .../export-const-number/expected.json | 117 ++++ .../export-default-array/actual.js | 1 + .../export-default-array/expected.json | 64 ++ .../export-default-class/actual.js | 1 + .../export-default-class/expected.json | 81 +++ .../export-default-expression/actual.js | 1 + .../export-default-expression/expected.json | 101 ++++ .../export-default-function/actual.js | 1 + .../export-default-function/expected.json | 83 +++ .../export-default-named-function/actual.js | 1 + .../expected.json | 98 +++ .../export-default-number/actual.js | 1 + .../export-default-number/expected.json | 66 ++ .../export-default-object/actual.js | 1 + .../export-default-object/expected.json | 118 ++++ .../export-default-value/actual.js | 1 + .../export-default-value/expected.json | 64 ++ .../export-from-batch/actual.js | 1 + .../export-from-batch/expected.json | 66 ++ .../export-from-default/actual.js | 1 + .../export-from-default/expected.json | 116 ++++ .../export-from-named-as-default/actual.js | 1 + .../expected.json | 116 ++++ .../export-from-named-as-specifier/actual.js | 1 + .../expected.json | 116 ++++ .../export-from-named-as-specifiers/actual.js | 1 + .../expected.json | 163 +++++ .../export-from-specifier/actual.js | 1 + .../export-from-specifier/expected.json | 116 ++++ .../export-from-specifiers/actual.js | 1 + .../export-from-specifiers/expected.json | 163 +++++ .../export-function-declaration/actual.js | 1 + .../export-function-declaration/expected.json | 133 ++++ .../export-function/actual.js | 1 + .../export-function/expected.json | 100 +++ .../export-let-number/actual.js | 1 + .../export-let-number/expected.json | 117 ++++ .../export-named-as-default/actual.js | 1 + .../export-named-as-default/expected.json | 99 +++ .../export-named-as-specifier/actual.js | 1 + .../export-named-as-specifier/expected.json | 99 +++ .../export-named-as-specifiers/actual.js | 1 + .../export-named-as-specifiers/expected.json | 146 +++++ .../export-named-empty/actual.js | 1 + .../export-named-empty/expected.json | 51 ++ .../export-named-specifier/actual.js | 1 + .../export-named-specifier/expected.json | 99 +++ .../export-named-specifiers-comma/actual.js | 1 + .../expected.json | 146 +++++ .../export-named-specifiers/actual.js | 1 + .../export-named-specifiers/expected.json | 146 +++++ .../export-var-anonymous-function/actual.js | 1 + .../expected.json | 134 +++++ .../export-var-number/actual.js | 1 + .../export-var-number/expected.json | 117 ++++ .../export-var/actual.js | 1 + .../export-var/expected.json | 100 +++ .../actual.js | 1 + .../options.json | 3 + .../invalid-export-batch-token/actual.js | 1 + .../invalid-export-batch-token/options.json | 3 + .../invalid-export-default-equal/actual.js | 1 + .../invalid-export-default-equal/options.json | 3 + .../invalid-export-default-token/actual.js | 1 + .../invalid-export-default-token/options.json | 3 + .../invalid-export-default/actual.js | 1 + .../invalid-export-default/options.json | 3 + .../invalid-export-named-default/actual.js | 1 + .../invalid-export-named-default/options.json | 3 + .../es2015-export-declaration/options.json | 3 + .../for-of-array-pattern-let/actual.js | 1 + .../for-of-array-pattern-let/expected.json | 162 +++++ .../for-of-array-pattern/actual.js | 1 + .../for-of-array-pattern/expected.json | 128 ++++ .../for-of-object-pattern-const/actual.js | 1 + .../for-of-object-pattern-const/expected.json | 232 +++++++ .../for-of-object-pattern/actual.js | 1 + .../for-of-object-pattern/expected.json | 198 ++++++ .../es2015-for-of/for-of-with-const/actual.js | 1 + .../for-of-with-const/expected.json | 129 ++++ .../es2015-for-of/for-of-with-let/actual.js | 1 + .../for-of-with-let/expected.json | 129 ++++ .../es2015-for-of/for-of-with-var/actual.js | 1 + .../for-of-with-var/expected.json | 129 ++++ .../esprima/es2015-for-of/for-of/actual.js | 1 + .../es2015-for-of/for-of/expected.json | 95 +++ .../invalid-const-init/actual.js | 1 + .../invalid-const-init/options.json | 3 + .../es2015-for-of/invalid-let-init/actual.js | 1 + .../invalid-let-init/options.json | 3 + .../es2015-for-of/invalid-lhs-init/actual.js | 1 + .../invalid-lhs-init/options.json | 3 + .../es2015-for-of/invalid-var-init/actual.js | 1 + .../invalid-var-init/expected.json | 146 +++++ .../invalid-var-init/options.json | 3 + .../esprima/es2015-for-of/let-of-of/actual.js | 1 + .../es2015-for-of/let-of-of/expected.json | 129 ++++ .../es2015-for-of/unexpected-number/actual.js | 1 + .../unexpected-number/options.json | 3 + .../actual.js | 1 + .../expected.json | 132 ++++ .../actual.js | 1 + .../expected.json | 133 ++++ .../actual.js | 1 + .../expected.json | 133 ++++ .../generator-declaration/actual.js | 1 + .../generator-declaration/expected.json | 83 +++ .../generator-expression-rest-param/actual.js | 1 + .../expected.json | 116 ++++ .../actual.js | 1 + .../expected.json | 133 ++++ .../actual.js | 1 + .../expected.json | 181 ++++++ .../generator-expression-with-yield/actual.js | 1 + .../expected.json | 134 +++++ .../generator-expression/actual.js | 1 + .../generator-expression/expected.json | 84 +++ .../actual.js | 3 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../generator-method-with-params/actual.js | 1 + .../expected.json | 185 ++++++ .../actual.js | 1 + .../expected.json | 186 ++++++ .../actual.js | 1 + .../expected.json | 186 ++++++ .../actual.js | 4 + .../expected.json | 202 +++++++ .../generator-method-with-yield/actual.js | 1 + .../generator-method-with-yield/expected.json | 169 ++++++ .../generator-method/actual.js | 1 + .../generator-method/expected.json | 136 +++++ .../actual.js | 3 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 3 + .../options.json | 3 + .../actual.js | 3 + .../options.json | 3 + .../actual.js | 3 + .../options.json | 3 + .../actual.js | 3 + .../options.json | 3 + .../actual.js | 3 + .../options.json | 3 + .../incomplete-yield-delegate/actual.js | 1 + .../incomplete-yield-delegate/options.json | 3 + .../malformed-generator-method-2/actual.js | 1 + .../malformed-generator-method-2/options.json | 3 + .../malformed-generator-method/actual.js | 1 + .../malformed-generator-method/options.json | 3 + .../actual.js | 1 + .../expected.json | 151 +++++ .../static-generator-method/actual.js | 1 + .../static-generator-method/expected.json | 151 +++++ .../dakuten_handakuten/actual.js | 1 + .../dakuten_handakuten/expected.json | 96 +++ .../es2015-identifier/escaped_all/actual.js | 1 + .../escaped_all/expected.json | 83 +++ .../escaped_math_alef/actual.js | 1 + .../escaped_math_alef/expected.json | 83 +++ .../escaped_math_dal_part/actual.js | 1 + .../escaped_math_dal_part/expected.json | 83 +++ .../escaped_math_kaf_lam/actual.js | 1 + .../escaped_math_kaf_lam/expected.json | 83 +++ .../escaped_math_zain_start/actual.js | 1 + .../escaped_math_zain_start/expected.json | 83 +++ .../es2015-identifier/escaped_part/actual.js | 1 + .../escaped_part/expected.json | 83 +++ .../es2015-identifier/escaped_start/actual.js | 1 + .../escaped_start/expected.json | 83 +++ .../es2015-identifier/estimated/actual.js | 1 + .../es2015-identifier/estimated/expected.json | 83 +++ .../ethiopic_digits/actual.js | 1 + .../ethiopic_digits/expected.json | 83 +++ .../invalid_escaped_surrogate_pairs/actual.js | 1 + .../options.json | 3 + .../invalid_expression_await/actual.js | 1 + .../invalid_expression_await/options.json | 3 + .../invalid_function_wait/actual.js | 1 + .../invalid_function_wait/expected.json | 83 +++ .../invalid_function_wait/options.json | 3 + .../invalid_id_smp/actual.js | 1 + .../invalid_id_smp/options.json | 3 + .../invalid_lone_surrogate/actual.js | 1 + .../invalid_lone_surrogate/expected.json | 100 +++ .../invalid_lone_surrogate/options.json | 3 + .../invalid_var_await/actual.js | 1 + .../invalid_var_await/options.json | 3 + .../es2015-identifier/math_alef/actual.js | 1 + .../es2015-identifier/math_alef/expected.json | 83 +++ .../es2015-identifier/math_dal_part/actual.js | 1 + .../math_dal_part/expected.json | 83 +++ .../es2015-identifier/math_kaf_lam/actual.js | 1 + .../math_kaf_lam/expected.json | 83 +++ .../math_zain_start/actual.js | 1 + .../math_zain_start/expected.json | 83 +++ .../es2015-identifier/module_await/actual.js | 1 + .../module_await/expected.json | 98 +++ .../es2015-identifier/valid_await/actual.js | 1 + .../valid_await/expected.json | 115 ++++ .../es2015-identifier/weierstrass/actual.js | 1 + .../weierstrass/expected.json | 83 +++ .../weierstrass_weierstrass/actual.js | 1 + .../weierstrass_weierstrass/expected.json | 83 +++ .../actual.js | 1 + .../expected.json | 146 +++++ .../actual.js | 1 + .../expected.json | 130 ++++ .../import-default-as/actual.js | 1 + .../import-default-as/expected.json | 115 ++++ .../import-default/actual.js | 1 + .../import-default/expected.json | 99 +++ .../import-jquery/actual.js | 1 + .../import-jquery/expected.json | 99 +++ .../import-module/actual.js | 1 + .../import-module/expected.json | 67 +++ .../import-named-as-specifier/actual.js | 1 + .../import-named-as-specifier/expected.json | 115 ++++ .../import-named-as-specifiers/actual.js | 1 + .../import-named-as-specifiers/expected.json | 162 +++++ .../import-named-empty/actual.js | 1 + .../import-named-empty/expected.json | 67 +++ .../import-named-specifier/actual.js | 1 + .../import-named-specifier/expected.json | 115 ++++ .../import-named-specifiers-comma/actual.js | 1 + .../expected.json | 162 +++++ .../import-named-specifiers/actual.js | 1 + .../import-named-specifiers/expected.json | 162 +++++ .../import-namespace-specifier/actual.js | 1 + .../import-namespace-specifier/expected.json | 99 +++ .../import-null-as-nil/actual.js | 1 + .../import-null-as-nil/expected.json | 115 ++++ .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../invalid-import-default/actual.js | 1 + .../invalid-import-default/options.json | 3 + .../invalid-import-missing-comma/actual.js | 1 + .../invalid-import-missing-comma/options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../invalid-import-module-specifier/actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../invalid-import-specifiers/actual.js | 1 + .../invalid-import-specifiers/options.json | 3 + .../es2015-import-declaration/options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../invalid_const_forin/actual.js | 1 + .../invalid_const_forin/options.json | 3 + .../invalid_let_forin/actual.js | 1 + .../invalid_let_forin/options.json | 3 + .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 184 ++++++ .../assign-new-target/actual.js | 3 + .../assign-new-target/expected.json | 180 ++++++ .../invalid-dots/actual.js | 1 + .../invalid-dots/options.json | 3 + .../invalid-new-target/actual.js | 1 + .../invalid-new-target/expected.json | 129 ++++ .../invalid-new-target/options.json | 3 + .../new-new-target/actual.js | 3 + .../new-new-target/expected.json | 162 +++++ .../new-target-declaration/actual.js | 3 + .../new-target-declaration/expected.json | 146 +++++ .../new-target-expression/actual.js | 1 + .../new-target-expression/expected.json | 180 ++++++ .../new-target-invoke/actual.js | 3 + .../new-target-invoke/expected.json | 162 +++++ .../new-target-precedence/actual.js | 3 + .../new-target-precedence/expected.json | 178 ++++++ .../unknown-property/actual.js | 1 + .../unknown-property/options.json | 3 + .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 167 +++++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 184 ++++++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 169 ++++++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 167 +++++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 167 +++++ .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../expected.json | 170 ++++++ .../options.json | 3 + .../invalid-proto-identifiers/actual.js | 1 + .../invalid-proto-identifiers/options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../invalid-proto-literal-shorthand/actual.js | 1 + .../expected.json | 172 ++++++ .../options.json | 3 + .../invalid-proto-literals/actual.js | 1 + .../invalid-proto-literals/options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../expected.json | 170 ++++++ .../options.json | 3 + .../invalid-proto-shorthand-literal/actual.js | 1 + .../expected.json | 172 ++++++ .../options.json | 3 + .../invalid-proto-shorthands/actual.js | 1 + .../invalid-proto-shorthands/expected.json | 168 ++++++ .../invalid-proto-shorthands/options.json | 3 + .../proto-identifier-getter-setter/actual.js | 1 + .../expected.json | 276 +++++++++ .../proto-identifier-getter/actual.js | 1 + .../proto-identifier-getter/expected.json | 189 ++++++ .../proto-identifier-method/actual.js | 1 + .../proto-identifier-method/expected.json | 189 ++++++ .../proto-identifier-setter/actual.js | 1 + .../proto-identifier-setter/expected.json | 206 +++++++ .../proto-literal-getter-setter/actual.js | 1 + .../proto-literal-getter-setter/expected.json | 278 +++++++++ .../proto-literal-getter/actual.js | 1 + .../proto-literal-getter/expected.json | 191 ++++++ .../proto-literal-method/actual.js | 1 + .../proto-literal-method/expected.json | 191 ++++++ .../proto-literal-setter/actual.js | 1 + .../proto-literal-setter/expected.json | 208 +++++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 199 ++++++ .../es2015-object-pattern/elision/actual.js | 1 + .../elision/expected.json | 152 +++++ .../empty-catch-param/actual.js | 1 + .../empty-catch-param/expected.json | 113 ++++ .../es2015-object-pattern/empty-fn/actual.js | 1 + .../empty-fn/expected.json | 100 +++ .../empty-for-lex/actual.js | 1 + .../empty-for-lex/expected.json | 131 ++++ .../empty-lexical/actual.js | 1 + .../empty-lexical/expected.json | 100 +++ .../es2015-object-pattern/empty-var/actual.js | 1 + .../empty-var/expected.json | 100 +++ .../es2015-object-pattern/nested/actual.js | 1 + .../nested/expected.json | 152 +++++ .../properties/actual.js | 1 + .../properties/expected.json | 439 ++++++++++++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 66 ++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 66 ++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 150 +++++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 66 ++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 66 ++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 66 ++ .../migrated_0006/actual.js | 1 + .../migrated_0006/expected.json | 150 +++++ .../function-declaration/actual.js | 1 + .../function-declaration/expected.json | 131 ++++ .../function-expression/actual.js | 1 + .../function-expression/expected.json | 163 +++++ .../object-method/actual.js | 1 + .../object-method/expected.json | 215 +++++++ .../object-shorthand-method/actual.js | 1 + .../object-shorthand-method/expected.json | 199 ++++++ .../call-multi-spread/actual.js | 1 + .../call-multi-spread/expected.json | 174 ++++++ .../call-spread-default/actual.js | 1 + .../call-spread-default/expected.json | 160 +++++ .../call-spread-first/actual.js | 1 + .../call-spread-first/expected.json | 144 +++++ .../call-spread-number/actual.js | 1 + .../call-spread-number/expected.json | 114 ++++ .../call-spread/actual.js | 1 + .../call-spread/expected.json | 112 ++++ .../invalid-call-dot-dot/actual.js | 1 + .../invalid-call-dot-dot/options.json | 3 + .../invalid-call-dots/actual.js | 1 + .../invalid-call-dots/options.json | 3 + .../invalid-call-spreads/actual.js | 1 + .../invalid-call-spreads/options.json | 3 + .../invalid-new-dot-dot/actual.js | 1 + .../invalid-new-dot-dot/options.json | 3 + .../invalid-new-dots/actual.js | 1 + .../invalid-new-dots/options.json | 3 + .../invalid-new-spreads/actual.js | 1 + .../invalid-new-spreads/options.json | 3 + .../new-multi-spread/actual.js | 1 + .../new-multi-spread/expected.json | 174 ++++++ .../new-spread-default/actual.js | 1 + .../new-spread-default/expected.json | 160 +++++ .../new-spread-first/actual.js | 1 + .../new-spread-first/expected.json | 144 +++++ .../new-spread-number/actual.js | 1 + .../new-spread-number/expected.json | 114 ++++ .../new-spread/actual.js | 1 + .../new-spread/expected.json | 112 ++++ .../arrow_super/actual.js | 5 + .../arrow_super/expected.json | 232 +++++++ .../constructor_super/actual.js | 5 + .../constructor_super/expected.json | 213 +++++++ .../invalid_super_access/actual.js | 5 + .../invalid_super_access/options.json | 3 + .../invalid_super_id/actual.js | 3 + .../invalid_super_id/expected.json | 232 +++++++ .../invalid_super_id/options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../es2015-super-property/new_super/actual.js | 5 + .../new_super/expected.json | 245 ++++++++ .../super_computed/actual.js | 5 + .../super_computed/expected.json | 231 +++++++ .../super_member/actual.js | 5 + .../super_member/expected.json | 229 +++++++ .../after-switch/actual.js | 1 + .../after-switch/options.json | 3 + .../dollar-sign/actual.js | 1 + .../dollar-sign/expected.json | 86 +++ .../escape-sequences/actual.js | 1 + .../escape-sequences/expected.json | 100 +++ .../invalid-escape/actual.js | 1 + .../invalid-escape/options.json | 3 + .../line-terminators/actual.js | 1 + .../line-terminators/expected.json | 100 +++ .../literal-escape-sequences/actual.js | 1 + .../literal-escape-sequences/expected.json | 100 +++ .../new-expression/actual.js | 1 + .../new-expression/expected.json | 133 ++++ .../octal-literal/actual.js | 1 + .../octal-literal/expected.json | 86 +++ .../octal-literal/options.json | 3 + .../strict-octal-literal/actual.js | 1 + .../strict-octal-literal/expected.json | 119 ++++ .../strict-octal-literal/options.json | 3 + .../tagged-interpolation/actual.js | 1 + .../tagged-interpolation/expected.json | 154 +++++ .../actual.js | 1 + .../expected.json | 267 ++++++++ .../es2015-template-literals/tagged/actual.js | 1 + .../tagged/expected.json | 117 ++++ .../unclosed-interpolation/actual.js | 1 + .../unclosed-interpolation/options.json | 3 + .../unclosed-nested/actual.js | 1 + .../unclosed-nested/options.json | 3 + .../unclosed/actual.js | 1 + .../unclosed/options.json | 3 + .../untagged/actual.js | 1 + .../untagged/expected.json | 86 +++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 100 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 100 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 100 +++ .../invalid-yield-binding-property/actual.js | 1 + .../options.json | 3 + .../invalid-yield-expression/actual.js | 1 + .../invalid-yield-expression/options.json | 3 + .../actual.js | 1 + .../expected.json | 200 ++++++ .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../invalid-yield-generator-catch/actual.js | 1 + .../expected.json | 164 +++++ .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../expected.json | 99 +++ .../options.json | 3 + .../actual.js | 1 + .../expected.json | 101 ++++ .../options.json | 3 + .../actual.js | 1 + .../expected.json | 132 ++++ .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../expected.json | 100 +++ .../options.json | 3 + .../invalid-yield-generator-rest/actual.js | 1 + .../expected.json | 163 +++++ .../invalid-yield-generator-rest/options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../expected.json | 134 +++++ .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../expected.json | 164 +++++ .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../expected.json | 117 ++++ .../options.json | 3 + .../actual.js | 1 + .../expected.json | 133 ++++ .../options.json | 3 + .../invalid-yield-strict-identifier/actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../actual.js | 1 + .../options.json | 3 + .../yield-array-pattern/actual.js | 1 + .../yield-array-pattern/expected.json | 114 ++++ .../yield-arrow-concise-body/actual.js | 1 + .../yield-arrow-concise-body/expected.json | 132 ++++ .../yield-arrow-function-body/actual.js | 1 + .../yield-arrow-function-body/expected.json | 164 +++++ .../yield-arrow-parameter-default/actual.js | 1 + .../expected.json | 131 ++++ .../yield-arrow-parameter-name/actual.js | 1 + .../yield-arrow-parameter-name/expected.json | 102 ++++ .../yield-binding-element/actual.js | 1 + .../yield-binding-element/expected.json | 150 +++++ .../yield-binding-property/actual.js | 1 + .../yield-binding-property/expected.json | 150 +++++ .../yield-call-expression-property/actual.js | 1 + .../expected.json | 163 +++++ .../yield-catch-parameter/actual.js | 1 + .../yield-catch-parameter/expected.json | 113 ++++ .../yield-expression-precedence/actual.js | 1 + .../yield-expression-precedence/expected.json | 260 ++++++++ .../actual.js | 1 + .../expected.json | 100 +++ .../yield-function-declaration/actual.js | 1 + .../yield-function-declaration/expected.json | 83 +++ .../actual.js | 1 + .../expected.json | 101 ++++ .../yield-function-expression/actual.js | 1 + .../yield-function-expression/expected.json | 99 +++ .../actual.js | 1 + .../expected.json | 183 ++++++ .../yield-generator-arrow-default/actual.js | 1 + .../expected.json | 183 ++++++ .../actual.js | 1 + .../expected.json | 215 +++++++ .../yield-generator-declaration/actual.js | 1 + .../yield-generator-declaration/expected.json | 83 +++ .../actual.js | 1 + .../expected.json | 131 ++++ .../actual.js | 1 + .../actual.js | 1 + .../expected.json | 185 ++++++ .../yield-generator-method/actual.js | 1 + .../yield-generator-method/expected.json | 136 +++++ .../actual.js | 1 + .../expected.json | 152 +++++ .../yield-lexical-declaration/actual.js | 1 + .../yield-lexical-declaration/expected.json | 100 +++ .../actual.js | 1 + .../expected.json | 163 +++++ .../es2015-yield/yield-method/actual.js | 1 + .../es2015-yield/yield-method/expected.json | 136 +++++ .../yield-parameter-object-pattern/actual.js | 1 + .../expected.json | 152 +++++ .../yield-rest-parameter/actual.js | 1 + .../yield-rest-parameter/expected.json | 115 ++++ .../yield-strict-binding-property/actual.js | 1 + .../expected.json | 183 ++++++ .../yield-strict-method/actual.js | 1 + .../yield-strict-method/expected.json | 169 ++++++ .../yield-super-property/actual.js | 1 + .../yield-super-property/expected.json | 229 +++++++ .../yield-variable-declaration/actual.js | 1 + .../yield-variable-declaration/expected.json | 83 +++ .../yield-yield-expression-delegate/actual.js | 1 + .../expected.json | 132 ++++ .../yield-yield-expression/actual.js | 1 + .../yield-yield-expression/expected.json | 132 ++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 96 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 96 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 100 +++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 98 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 98 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 98 +++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 98 +++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 98 +++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 98 +++ .../migrated_0006/actual.js | 1 + .../migrated_0006/expected.json | 98 +++ .../migrated_0007/actual.js | 1 + .../migrated_0007/expected.json | 98 +++ .../migrated_0008/actual.js | 1 + .../migrated_0008/expected.json | 98 +++ .../migrated_0009/actual.js | 1 + .../migrated_0009/expected.json | 98 +++ .../migrated_0010/actual.js | 1 + .../migrated_0010/expected.json | 98 +++ .../migrated_0011/actual.js | 1 + .../migrated_0011/expected.json | 98 +++ .../migrated_0012/actual.js | 1 + .../migrated_0012/expected.json | 98 +++ .../migrated_0013/actual.js | 1 + .../migrated_0013/expected.json | 98 +++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 96 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 96 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 96 +++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 96 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 96 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 128 ++++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 128 ++++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 128 ++++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 128 ++++ .../expression-binary/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 128 ++++ .../expression-binary/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 128 ++++ .../expression-binary/migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 128 ++++ .../expression-binary/migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 128 ++++ .../expression-binary/migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 128 ++++ .../expression-binary/migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 128 ++++ .../expression-binary/migrated_0006/actual.js | 1 + .../migrated_0006/expected.json | 128 ++++ .../expression-binary/migrated_0007/actual.js | 1 + .../migrated_0007/expected.json | 128 ++++ .../expression-binary/migrated_0008/actual.js | 1 + .../migrated_0008/expected.json | 128 ++++ .../expression-binary/migrated_0009/actual.js | 1 + .../migrated_0009/expected.json | 128 ++++ .../expression-binary/migrated_0010/actual.js | 1 + .../migrated_0010/expected.json | 128 ++++ .../expression-binary/migrated_0011/actual.js | 1 + .../migrated_0011/expected.json | 128 ++++ .../expression-binary/migrated_0012/actual.js | 1 + .../migrated_0012/expected.json | 128 ++++ .../expression-binary/migrated_0013/actual.js | 1 + .../migrated_0013/expected.json | 128 ++++ .../expression-binary/migrated_0014/actual.js | 1 + .../migrated_0014/expected.json | 128 ++++ .../expression-binary/migrated_0015/actual.js | 1 + .../migrated_0015/expected.json | 128 ++++ .../expression-binary/migrated_0016/actual.js | 1 + .../migrated_0016/expected.json | 128 ++++ .../expression-binary/migrated_0017/actual.js | 1 + .../migrated_0017/expected.json | 128 ++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 96 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 96 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 96 +++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 384 ++++++++++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 115 ++++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 147 +++++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 150 +++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 96 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 96 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 96 +++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 96 +++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 136 +++++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 135 +++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 80 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 80 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 96 +++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 96 +++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 128 ++++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 112 ++++ .../migrated_0006/actual.js | 1 + .../migrated_0006/expected.json | 112 ++++ .../migrated_0007/actual.js | 1 + .../migrated_0007/expected.json | 129 ++++ .../migrated_0008/actual.js | 1 + .../migrated_0008/expected.json | 113 ++++ .../migrated_0009/actual.js | 1 + .../migrated_0009/expected.json | 81 +++ .../migrated_0010/actual.js | 1 + .../migrated_0010/expected.json | 96 +++ .../migrated_0011/actual.js | 1 + .../migrated_0011/expected.json | 128 ++++ .../migrated_0012/actual.js | 1 + .../migrated_0012/expected.json | 160 +++++ .../migrated_0013/actual.js | 1 + .../migrated_0013/expected.json | 129 ++++ .../migrated_0014/actual.js | 1 + .../migrated_0014/expected.json | 96 +++ .../migrated_0015/actual.js | 1 + .../migrated_0015/expected.json | 130 ++++ .../migrated_0016/actual.js | 1 + .../migrated_0016/expected.json | 131 ++++ .../migrated_0017/actual.js | 1 + .../migrated_0017/expected.json | 234 ++++++++ .../migrated_0018/actual.js | 1 + .../migrated_0018/expected.json | 195 ++++++ .../migrated_0019/actual.js | 1 + .../migrated_0019/expected.json | 96 +++ .../migrated_0020/actual.js | 1 + .../migrated_0020/expected.json | 96 +++ .../migrated_0021/actual.js | 1 + .../migrated_0021/expected.json | 96 +++ .../migrated_0022/actual.js | 1 + .../migrated_0022/expected.json | 96 +++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 96 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 96 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 96 +++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 81 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 81 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 81 +++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 81 +++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 81 +++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 81 +++ .../expression-primary/array/expected.json | 32 + .../expression-primary/array/migrated_0000.js | 1 + .../expression-primary/array/migrated_0001.js | 1 + .../expression-primary/array/migrated_0002.js | 1 + .../expression-primary/array/migrated_0003.js | 1 + .../expression-primary/array/migrated_0004.js | 1 + .../expression-primary/array/migrated_0005.js | 1 + .../expression-primary/array/migrated_0006.js | 1 + .../expression-primary/array/migrated_0007.js | 1 + .../array/migrated_0008.source.js | 1 + .../array/migrated_0009.source.js | 1 + .../array/migrated_0010.source.js | 1 + .../array/migrated_0011.source.js | 1 + .../array/migrated_0012.source.js | 1 + .../expression-primary/literal/expected.json | 32 + .../literal/numeric/migrated_0000.js | 1 + .../literal/numeric/migrated_0001.js | 1 + .../literal/numeric/migrated_0002.js | 1 + .../literal/numeric/migrated_0003.js | 1 + .../literal/numeric/migrated_0004.js | 1 + .../literal/numeric/migrated_0005.js | 1 + .../literal/numeric/migrated_0006.js | 1 + .../literal/numeric/migrated_0007.js | 1 + .../literal/numeric/migrated_0008.js | 1 + .../literal/numeric/migrated_0009.js | 1 + .../literal/numeric/migrated_0010.js | 1 + .../literal/numeric/migrated_0011.js | 1 + .../literal/numeric/migrated_0012.js | 1 + .../literal/numeric/migrated_0013.js | 1 + .../literal/numeric/migrated_0014.js | 1 + .../literal/numeric/migrated_0015.js | 1 + .../literal/numeric/migrated_0016.js | 1 + .../literal/numeric/migrated_0017.js | 1 + .../literal/numeric/migrated_0018.js | 1 + .../literal/numeric/migrated_0019.js | 1 + .../literal/numeric/migrated_0020.js | 1 + .../literal/numeric/migrated_0021.js | 1 + .../literal/numeric/migrated_0022.js | 1 + .../literal/numeric/migrated_0023.js | 1 + .../literal/numeric/migrated_0024.js | 1 + .../regular-expression/migrated_0000.js | 1 + .../regular-expression/migrated_0001.js | 1 + .../regular-expression/migrated_0002.js | 1 + .../regular-expression/migrated_0003.js | 1 + .../regular-expression/migrated_0004.js | 1 + .../migrated_0005.source.js | 1 + .../migrated_0006.failure.json | 6 + .../migrated_0006.source.js | 1 + .../regular-expression/migrated_0007.js | 1 + .../regular-expression/migrated_0008.js | 1 + .../regular-expression/migrated_0009.js | 1 + .../regular-expression/migrated_0010.js | 1 + .../regular-expression/migrated_0011.js | 1 + .../regular-expression/migrated_0012.js | 1 + .../regular-expression/migrated_0013.js | 1 + .../u-flag-invalid-range-4-hex.failure.json | 6 + .../u-flag-invalid-range-4-hex.js | 1 + .../u-flag-invalid-range-var-hex.failure.json | 6 + .../u-flag-invalid-range-var-hex.js | 1 + .../u-flag-surrogate-pair.js | 1 + .../regular-expression/u-flag-valid-range.js | 1 + .../literal/string/migrated_0000.js | 1 + .../literal/string/migrated_0001.js | 1 + .../literal/string/migrated_0002.source.js | 1 + .../literal/string/migrated_0003.js | 1 + .../literal/string/migrated_0006.js | 1 + .../literal/string/migrated_0007.js | 2 + .../literal/string/migrated_0008.js | 1 + .../literal/string/migrated_0009.js | 1 + .../literal/string/migrated_0010.js | 1 + .../literal/string/migrated_0011.js | 1 + .../literal/string/migrated_0012.js | 1 + .../literal/string/migrated_0013.js | 1 + .../literal/string/migrated_0015.js | 1 + .../literal/string/migrated_0016.js | 1 + .../literal/string/migrated_0017.js | 2 + .../literal/string/migrated_0018.js | 1 + .../expression-primary/object/expected.json | 32 + .../object/migrated_0000.js | 1 + .../object/migrated_0001.js | 1 + .../object/migrated_0002.js | 1 + .../object/migrated_0003.js | 1 + .../object/migrated_0004.js | 1 + .../object/migrated_0005.js | 1 + .../object/migrated_0006.js | 1 + .../object/migrated_0007.js | 1 + .../object/migrated_0008.js | 1 + .../object/migrated_0009.js | 1 + .../object/migrated_0010.js | 1 + .../object/migrated_0011.js | 1 + .../object/migrated_0012.js | 1 + .../object/migrated_0013.js | 1 + .../object/migrated_0014.js | 1 + .../object/migrated_0015.js | 1 + .../object/migrated_0016.js | 1 + .../object/migrated_0017.js | 1 + .../object/migrated_0018.js | 1 + .../object/migrated_0019.js | 1 + .../object/migrated_0020.js | 1 + .../object/migrated_0021.js | 1 + .../object/migrated_0022.js | 1 + .../object/migrated_0023.js | 1 + .../object/migrated_0024.js | 1 + .../object/migrated_0025.js | 1 + .../object/migrated_0026.js | 1 + .../object/migrated_0027.js | 1 + .../object/migrated_0028.js | 1 + .../object/migrated_0029.js | 1 + .../object/migrated_0030.js | 1 + .../object/migrated_0031.js | 1 + .../object/migrated_0032.js | 1 + .../object/migrated_0033.js | 1 + .../object/migrated_0034.js | 1 + .../object/migrated_0035.js | 1 + .../object/migrated_0036.js | 1 + .../object/migrated_0037.js | 1 + .../object/migrated_0038.js | 1 + .../expression-primary/other/expected.json | 32 + .../expression-primary/other/migrated_0000.js | 1 + .../expression-primary/other/migrated_0001.js | 1 + .../expression-primary/other/migrated_0002.js | 3 + .../expression-primary/other/migrated_0003.js | 1 + .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 96 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 96 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 96 +++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 96 +++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 96 +++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 96 +++ .../migrated_0006/actual.js | 1 + .../migrated_0006/expected.json | 128 ++++ .../expression-unary/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 81 +++ .../expression-unary/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 81 +++ .../expression-unary/migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 81 +++ .../expression-unary/migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 81 +++ .../expression-unary/migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 81 +++ .../expression-unary/migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 81 +++ .../expression-unary/migrated_0006/actual.js | 1 + .../migrated_0006/expected.json | 81 +++ .../expression-unary/migrated_0007/actual.js | 1 + .../migrated_0007/expected.json | 81 +++ .../expression-unary/migrated_0008/actual.js | 1 + .../migrated_0008/expected.json | 81 +++ .../expression-unary/migrated_0009/actual.js | 1 + .../migrated_0009/expected.json | 81 +++ .../expression-unary/migrated_0010/actual.js | 1 + .../migrated_0010/expected.json | 81 +++ .../expression-unary/migrated_0011/actual.js | 1 + .../migrated_0011/expected.json | 81 +++ .../expression-unary/migrated_0012/actual.js | 1 + .../migrated_0012/expected.json | 81 +++ .../invalid-syntax/GH-1106-00/actual.js | 1 + .../invalid-syntax/GH-1106-00/options.json | 3 + .../invalid-syntax/GH-1106-01/actual.js | 1 + .../invalid-syntax/GH-1106-01/options.json | 3 + .../invalid-syntax/GH-1106-02/actual.js | 1 + .../invalid-syntax/GH-1106-02/options.json | 3 + .../invalid-syntax/GH-1106-03/actual.js | 1 + .../invalid-syntax/GH-1106-03/options.json | 3 + .../invalid-syntax/GH-1106-04/actual.js | 1 + .../invalid-syntax/GH-1106-04/options.json | 3 + .../invalid-syntax/GH-1106-05/actual.js | 1 + .../invalid-syntax/GH-1106-05/options.json | 3 + .../invalid-syntax/GH-1106-06/actual.js | 1 + .../invalid-syntax/GH-1106-06/options.json | 3 + .../invalid-syntax/GH-1106-07/actual.js | 1 + .../invalid-syntax/GH-1106-07/options.json | 3 + .../invalid-syntax/GH-1106-09/actual.js | 1 + .../invalid-syntax/GH-1106-09/expected.json | 66 ++ .../invalid-syntax/GH-1106-09/options.json | 3 + .../invalid-syntax/migrated_0000/actual.js | 1 + .../invalid-syntax/migrated_0000/options.json | 3 + .../invalid-syntax/migrated_0001/actual.js | 1 + .../invalid-syntax/migrated_0001/options.json | 3 + .../invalid-syntax/migrated_0002/actual.js | 1 + .../invalid-syntax/migrated_0002/options.json | 3 + .../invalid-syntax/migrated_0003/actual.js | 1 + .../invalid-syntax/migrated_0003/options.json | 3 + .../invalid-syntax/migrated_0004/actual.js | 1 + .../invalid-syntax/migrated_0004/options.json | 3 + .../invalid-syntax/migrated_0005/actual.js | 1 + .../invalid-syntax/migrated_0005/options.json | 3 + .../invalid-syntax/migrated_0006/actual.js | 1 + .../invalid-syntax/migrated_0006/options.json | 3 + .../invalid-syntax/migrated_0007/actual.js | 1 + .../invalid-syntax/migrated_0007/options.json | 3 + .../invalid-syntax/migrated_0008/actual.js | 1 + .../invalid-syntax/migrated_0008/options.json | 3 + .../invalid-syntax/migrated_0009/actual.js | 1 + .../invalid-syntax/migrated_0009/options.json | 3 + .../invalid-syntax/migrated_0010/actual.js | 1 + .../invalid-syntax/migrated_0010/options.json | 3 + .../invalid-syntax/migrated_0011/actual.js | 1 + .../invalid-syntax/migrated_0011/options.json | 3 + .../invalid-syntax/migrated_0012/actual.js | 1 + .../invalid-syntax/migrated_0012/options.json | 3 + .../invalid-syntax/migrated_0013/actual.js | 1 + .../invalid-syntax/migrated_0013/options.json | 3 + .../invalid-syntax/migrated_0014/actual.js | 1 + .../invalid-syntax/migrated_0014/options.json | 3 + .../invalid-syntax/migrated_0015/actual.js | 1 + .../invalid-syntax/migrated_0015/options.json | 3 + .../invalid-syntax/migrated_0016/actual.js | 1 + .../invalid-syntax/migrated_0016/options.json | 3 + .../invalid-syntax/migrated_0017/actual.js | 1 + .../invalid-syntax/migrated_0017/options.json | 3 + .../invalid-syntax/migrated_0018/actual.js | 1 + .../invalid-syntax/migrated_0018/options.json | 3 + .../invalid-syntax/migrated_0019/actual.js | 1 + .../invalid-syntax/migrated_0019/options.json | 3 + .../invalid-syntax/migrated_0020/actual.js | 1 + .../invalid-syntax/migrated_0020/options.json | 3 + .../invalid-syntax/migrated_0021/actual.js | 1 + .../invalid-syntax/migrated_0021/options.json | 3 + .../invalid-syntax/migrated_0022/actual.js | 1 + .../invalid-syntax/migrated_0022/options.json | 3 + .../invalid-syntax/migrated_0023/actual.js | 1 + .../invalid-syntax/migrated_0023/options.json | 3 + .../invalid-syntax/migrated_0024/actual.js | 1 + .../invalid-syntax/migrated_0024/options.json | 3 + .../invalid-syntax/migrated_0025/actual.js | 1 + .../invalid-syntax/migrated_0025/options.json | 3 + .../invalid-syntax/migrated_0026/actual.js | 1 + .../invalid-syntax/migrated_0026/options.json | 3 + .../invalid-syntax/migrated_0027/actual.js | 1 + .../invalid-syntax/migrated_0027/options.json | 3 + .../invalid-syntax/migrated_0028/actual.js | 1 + .../invalid-syntax/migrated_0028/options.json | 3 + .../invalid-syntax/migrated_0029/actual.js | 1 + .../invalid-syntax/migrated_0029/options.json | 3 + .../invalid-syntax/migrated_0030/actual.js | 1 + .../invalid-syntax/migrated_0030/options.json | 3 + .../invalid-syntax/migrated_0031/actual.js | 2 + .../invalid-syntax/migrated_0031/options.json | 3 + .../invalid-syntax/migrated_0032/actual.js | 1 + .../invalid-syntax/migrated_0032/options.json | 3 + .../invalid-syntax/migrated_0033/actual.js | 1 + .../migrated_0033/expected.json | 100 +++ .../invalid-syntax/migrated_0033/options.json | 3 + .../invalid-syntax/migrated_0034/actual.js | 1 + .../migrated_0034/expected.json | 100 +++ .../invalid-syntax/migrated_0034/options.json | 3 + .../invalid-syntax/migrated_0035/actual.js | 1 + .../invalid-syntax/migrated_0035/options.json | 3 + .../invalid-syntax/migrated_0036/actual.js | 1 + .../migrated_0036/expected.json | 100 +++ .../invalid-syntax/migrated_0036/options.json | 3 + .../invalid-syntax/migrated_0037/actual.js | 1 + .../migrated_0037/expected.json | 100 +++ .../invalid-syntax/migrated_0037/options.json | 3 + .../invalid-syntax/migrated_0038/actual.js | 1 + .../invalid-syntax/migrated_0038/options.json | 3 + .../invalid-syntax/migrated_0039/actual.js | 1 + .../invalid-syntax/migrated_0039/options.json | 3 + .../invalid-syntax/migrated_0040/actual.js | 2 + .../invalid-syntax/migrated_0040/options.json | 3 + .../invalid-syntax/migrated_0041/actual.js | 1 + .../migrated_0041/expected.json | 100 +++ .../invalid-syntax/migrated_0041/options.json | 3 + .../invalid-syntax/migrated_0042/actual.js | 1 + .../migrated_0042/expected.json | 100 +++ .../invalid-syntax/migrated_0042/options.json | 3 + .../invalid-syntax/migrated_0043/actual.js | 1 + .../migrated_0043/expected.json | 100 +++ .../invalid-syntax/migrated_0043/options.json | 3 + .../invalid-syntax/migrated_0044/actual.js | 1 + .../migrated_0044/expected.json | 100 +++ .../invalid-syntax/migrated_0044/options.json | 3 + .../invalid-syntax/migrated_0045/actual.js | 1 + .../invalid-syntax/migrated_0045/options.json | 3 + .../invalid-syntax/migrated_0046/actual.js | 1 + .../invalid-syntax/migrated_0046/options.json | 3 + .../invalid-syntax/migrated_0047/actual.js | 1 + .../invalid-syntax/migrated_0047/options.json | 3 + .../invalid-syntax/migrated_0048/actual.js | 1 + .../migrated_0048/expected.json | 100 +++ .../invalid-syntax/migrated_0048/options.json | 3 + .../invalid-syntax/migrated_0049/actual.js | 1 + .../migrated_0049/expected.json | 100 +++ .../invalid-syntax/migrated_0049/options.json | 3 + .../invalid-syntax/migrated_0050/actual.js | 1 + .../migrated_0050/expected.json | 100 +++ .../invalid-syntax/migrated_0050/options.json | 3 + .../invalid-syntax/migrated_0051/actual.js | 1 + .../migrated_0051/expected.json | 100 +++ .../invalid-syntax/migrated_0051/options.json | 3 + .../invalid-syntax/migrated_0052/actual.js | 1 + .../invalid-syntax/migrated_0052/options.json | 3 + .../invalid-syntax/migrated_0053/actual.js | 1 + .../invalid-syntax/migrated_0053/options.json | 3 + .../invalid-syntax/migrated_0054/actual.js | 1 + .../invalid-syntax/migrated_0054/options.json | 3 + .../invalid-syntax/migrated_0055/actual.js | 1 + .../invalid-syntax/migrated_0055/options.json | 3 + .../invalid-syntax/migrated_0056/actual.js | 1 + .../invalid-syntax/migrated_0056/options.json | 3 + .../invalid-syntax/migrated_0057/actual.js | 1 + .../invalid-syntax/migrated_0057/options.json | 3 + .../invalid-syntax/migrated_0058/actual.js | 1 + .../invalid-syntax/migrated_0058/options.json | 3 + .../invalid-syntax/migrated_0059/actual.js | 1 + .../invalid-syntax/migrated_0059/options.json | 3 + .../invalid-syntax/migrated_0060/actual.js | 1 + .../invalid-syntax/migrated_0060/options.json | 3 + .../invalid-syntax/migrated_0061/actual.js | 1 + .../invalid-syntax/migrated_0061/options.json | 3 + .../invalid-syntax/migrated_0062/actual.js | 2 + .../invalid-syntax/migrated_0062/options.json | 3 + .../invalid-syntax/migrated_0063/actual.js | 1 + .../invalid-syntax/migrated_0063/options.json | 3 + .../invalid-syntax/migrated_0064/actual.js | 1 + .../invalid-syntax/migrated_0064/options.json | 3 + .../invalid-syntax/migrated_0065/actual.js | 1 + .../invalid-syntax/migrated_0065/options.json | 3 + .../invalid-syntax/migrated_0066/actual.js | 1 + .../invalid-syntax/migrated_0066/options.json | 3 + .../invalid-syntax/migrated_0067/actual.js | 1 + .../invalid-syntax/migrated_0067/options.json | 3 + .../invalid-syntax/migrated_0068/actual.js | 1 + .../invalid-syntax/migrated_0068/options.json | 3 + .../invalid-syntax/migrated_0069/actual.js | 1 + .../invalid-syntax/migrated_0069/options.json | 3 + .../invalid-syntax/migrated_0070/actual.js | 3 + .../invalid-syntax/migrated_0070/options.json | 3 + .../invalid-syntax/migrated_0071/actual.js | 1 + .../invalid-syntax/migrated_0071/options.json | 3 + .../invalid-syntax/migrated_0072/actual.js | 1 + .../invalid-syntax/migrated_0072/options.json | 3 + .../invalid-syntax/migrated_0073/actual.js | 1 + .../invalid-syntax/migrated_0073/options.json | 3 + .../invalid-syntax/migrated_0074/actual.js | 1 + .../invalid-syntax/migrated_0074/options.json | 3 + .../invalid-syntax/migrated_0075/actual.js | 1 + .../invalid-syntax/migrated_0075/options.json | 3 + .../invalid-syntax/migrated_0076/actual.js | 1 + .../invalid-syntax/migrated_0076/options.json | 3 + .../invalid-syntax/migrated_0077/actual.js | 1 + .../invalid-syntax/migrated_0077/options.json | 3 + .../invalid-syntax/migrated_0078/actual.js | 1 + .../invalid-syntax/migrated_0078/options.json | 3 + .../invalid-syntax/migrated_0080/actual.js | 1 + .../invalid-syntax/migrated_0080/options.json | 3 + .../invalid-syntax/migrated_0081/actual.js | 1 + .../invalid-syntax/migrated_0081/options.json | 3 + .../invalid-syntax/migrated_0082/actual.js | 1 + .../invalid-syntax/migrated_0082/options.json | 3 + .../invalid-syntax/migrated_0083/actual.js | 1 + .../invalid-syntax/migrated_0083/options.json | 3 + .../invalid-syntax/migrated_0084/actual.js | 1 + .../invalid-syntax/migrated_0084/options.json | 3 + .../invalid-syntax/migrated_0085/actual.js | 1 + .../invalid-syntax/migrated_0085/options.json | 3 + .../invalid-syntax/migrated_0086/actual.js | 1 + .../invalid-syntax/migrated_0086/options.json | 3 + .../invalid-syntax/migrated_0087/actual.js | 1 + .../invalid-syntax/migrated_0087/options.json | 3 + .../invalid-syntax/migrated_0088/actual.js | 1 + .../invalid-syntax/migrated_0088/options.json | 3 + .../invalid-syntax/migrated_0089/actual.js | 1 + .../invalid-syntax/migrated_0089/options.json | 3 + .../invalid-syntax/migrated_0090/actual.js | 1 + .../invalid-syntax/migrated_0090/options.json | 3 + .../invalid-syntax/migrated_0091/actual.js | 1 + .../invalid-syntax/migrated_0091/options.json | 3 + .../invalid-syntax/migrated_0092/actual.js | 1 + .../migrated_0092/expected.json | 118 ++++ .../invalid-syntax/migrated_0092/options.json | 3 + .../invalid-syntax/migrated_0093/actual.js | 1 + .../invalid-syntax/migrated_0093/options.json | 3 + .../invalid-syntax/migrated_0094/actual.js | 1 + .../invalid-syntax/migrated_0094/options.json | 3 + .../invalid-syntax/migrated_0095/actual.js | 1 + .../invalid-syntax/migrated_0095/options.json | 3 + .../invalid-syntax/migrated_0096/actual.js | 1 + .../invalid-syntax/migrated_0096/options.json | 3 + .../invalid-syntax/migrated_0097/actual.js | 1 + .../invalid-syntax/migrated_0097/options.json | 3 + .../invalid-syntax/migrated_0098/actual.js | 1 + .../invalid-syntax/migrated_0098/options.json | 3 + .../invalid-syntax/migrated_0099/actual.js | 1 + .../invalid-syntax/migrated_0099/options.json | 3 + .../invalid-syntax/migrated_0100/actual.js | 1 + .../invalid-syntax/migrated_0100/options.json | 3 + .../invalid-syntax/migrated_0101/actual.js | 1 + .../migrated_0101/expected.json | 167 +++++ .../invalid-syntax/migrated_0101/options.json | 3 + .../invalid-syntax/migrated_0102/actual.js | 1 + .../invalid-syntax/migrated_0102/options.json | 3 + .../invalid-syntax/migrated_0103/actual.js | 1 + .../invalid-syntax/migrated_0103/options.json | 3 + .../invalid-syntax/migrated_0104/actual.js | 1 + .../invalid-syntax/migrated_0104/options.json | 3 + .../invalid-syntax/migrated_0105/actual.js | 1 + .../invalid-syntax/migrated_0105/options.json | 3 + .../invalid-syntax/migrated_0106/actual.js | 1 + .../invalid-syntax/migrated_0106/options.json | 3 + .../invalid-syntax/migrated_0107/actual.js | 1 + .../invalid-syntax/migrated_0107/options.json | 3 + .../invalid-syntax/migrated_0108/actual.js | 1 + .../invalid-syntax/migrated_0108/options.json | 3 + .../invalid-syntax/migrated_0109/actual.js | 1 + .../invalid-syntax/migrated_0109/options.json | 3 + .../invalid-syntax/migrated_0110/actual.js | 1 + .../invalid-syntax/migrated_0110/options.json | 3 + .../invalid-syntax/migrated_0111/actual.js | 1 + .../invalid-syntax/migrated_0111/options.json | 3 + .../invalid-syntax/migrated_0112/actual.js | 1 + .../invalid-syntax/migrated_0112/options.json | 3 + .../invalid-syntax/migrated_0113/actual.js | 1 + .../invalid-syntax/migrated_0113/options.json | 3 + .../invalid-syntax/migrated_0114/actual.js | 1 + .../invalid-syntax/migrated_0114/options.json | 3 + .../invalid-syntax/migrated_0115/actual.js | 1 + .../invalid-syntax/migrated_0115/options.json | 3 + .../invalid-syntax/migrated_0116/actual.js | 1 + .../invalid-syntax/migrated_0116/options.json | 3 + .../invalid-syntax/migrated_0117/actual.js | 1 + .../invalid-syntax/migrated_0117/options.json | 3 + .../invalid-syntax/migrated_0118/actual.js | 1 + .../invalid-syntax/migrated_0118/options.json | 3 + .../invalid-syntax/migrated_0119/actual.js | 1 + .../invalid-syntax/migrated_0119/options.json | 3 + .../invalid-syntax/migrated_0120/actual.js | 1 + .../invalid-syntax/migrated_0120/options.json | 3 + .../invalid-syntax/migrated_0121/actual.js | 1 + .../invalid-syntax/migrated_0121/options.json | 3 + .../invalid-syntax/migrated_0122/actual.js | 1 + .../invalid-syntax/migrated_0122/options.json | 3 + .../invalid-syntax/migrated_0123/actual.js | 1 + .../invalid-syntax/migrated_0123/options.json | 3 + .../invalid-syntax/migrated_0124/actual.js | 1 + .../invalid-syntax/migrated_0124/options.json | 3 + .../invalid-syntax/migrated_0125/actual.js | 1 + .../invalid-syntax/migrated_0125/options.json | 3 + .../invalid-syntax/migrated_0126/actual.js | 1 + .../invalid-syntax/migrated_0126/options.json | 3 + .../invalid-syntax/migrated_0127/actual.js | 1 + .../invalid-syntax/migrated_0127/options.json | 3 + .../invalid-syntax/migrated_0128/actual.js | 1 + .../invalid-syntax/migrated_0128/options.json | 3 + .../invalid-syntax/migrated_0129/actual.js | 1 + .../invalid-syntax/migrated_0129/options.json | 3 + .../invalid-syntax/migrated_0130/actual.js | 1 + .../invalid-syntax/migrated_0130/options.json | 3 + .../invalid-syntax/migrated_0131/actual.js | 1 + .../invalid-syntax/migrated_0131/options.json | 3 + .../invalid-syntax/migrated_0132/actual.js | 1 + .../invalid-syntax/migrated_0132/options.json | 3 + .../invalid-syntax/migrated_0133/actual.js | 1 + .../invalid-syntax/migrated_0133/options.json | 3 + .../invalid-syntax/migrated_0134/actual.js | 1 + .../invalid-syntax/migrated_0134/options.json | 3 + .../invalid-syntax/migrated_0135/actual.js | 1 + .../invalid-syntax/migrated_0135/options.json | 3 + .../invalid-syntax/migrated_0136/actual.js | 1 + .../invalid-syntax/migrated_0136/options.json | 3 + .../invalid-syntax/migrated_0137/actual.js | 1 + .../migrated_0137/expected.json | 100 +++ .../invalid-syntax/migrated_0137/options.json | 3 + .../invalid-syntax/migrated_0138/actual.js | 1 + .../migrated_0138/expected.json | 132 ++++ .../invalid-syntax/migrated_0138/options.json | 3 + .../invalid-syntax/migrated_0139/actual.js | 1 + .../migrated_0139/expected.json | 132 ++++ .../invalid-syntax/migrated_0139/options.json | 3 + .../invalid-syntax/migrated_0140/actual.js | 1 + .../migrated_0140/expected.json | 83 +++ .../invalid-syntax/migrated_0140/options.json | 3 + .../invalid-syntax/migrated_0141/actual.js | 1 + .../invalid-syntax/migrated_0141/options.json | 3 + .../invalid-syntax/migrated_0142/actual.js | 1 + .../invalid-syntax/migrated_0142/options.json | 3 + .../invalid-syntax/migrated_0143/actual.js | 1 + .../invalid-syntax/migrated_0143/options.json | 3 + .../invalid-syntax/migrated_0144/actual.js | 1 + .../invalid-syntax/migrated_0144/options.json | 3 + .../invalid-syntax/migrated_0145/actual.js | 1 + .../invalid-syntax/migrated_0145/options.json | 3 + .../invalid-syntax/migrated_0146/actual.js | 1 + .../invalid-syntax/migrated_0146/options.json | 3 + .../invalid-syntax/migrated_0147/actual.js | 1 + .../invalid-syntax/migrated_0147/options.json | 3 + .../invalid-syntax/migrated_0148/actual.js | 3 + .../invalid-syntax/migrated_0148/options.json | 3 + .../invalid-syntax/migrated_0149/actual.js | 1 + .../invalid-syntax/migrated_0149/options.json | 3 + .../invalid-syntax/migrated_0150/actual.js | 1 + .../invalid-syntax/migrated_0150/options.json | 3 + .../invalid-syntax/migrated_0151/actual.js | 1 + .../invalid-syntax/migrated_0151/options.json | 3 + .../invalid-syntax/migrated_0152/actual.js | 1 + .../invalid-syntax/migrated_0152/options.json | 3 + .../invalid-syntax/migrated_0153/actual.js | 1 + .../invalid-syntax/migrated_0153/options.json | 3 + .../invalid-syntax/migrated_0154/actual.js | 1 + .../invalid-syntax/migrated_0154/options.json | 3 + .../invalid-syntax/migrated_0155/actual.js | 2 + .../invalid-syntax/migrated_0155/options.json | 3 + .../invalid-syntax/migrated_0156/actual.js | 2 + .../invalid-syntax/migrated_0156/options.json | 3 + .../invalid-syntax/migrated_0157/actual.js | 2 + .../invalid-syntax/migrated_0157/options.json | 3 + .../invalid-syntax/migrated_0158/actual.js | 2 + .../invalid-syntax/migrated_0158/options.json | 3 + .../invalid-syntax/migrated_0159/actual.js | 2 + .../invalid-syntax/migrated_0159/options.json | 3 + .../invalid-syntax/migrated_0160/actual.js | 2 + .../invalid-syntax/migrated_0160/options.json | 3 + .../invalid-syntax/migrated_0161/actual.js | 2 + .../invalid-syntax/migrated_0161/options.json | 3 + .../invalid-syntax/migrated_0162/actual.js | 1 + .../invalid-syntax/migrated_0162/options.json | 3 + .../invalid-syntax/migrated_0163/actual.js | 1 + .../migrated_0163/expected.json | 100 +++ .../invalid-syntax/migrated_0163/options.json | 3 + .../invalid-syntax/migrated_0164/actual.js | 1 + .../invalid-syntax/migrated_0164/options.json | 3 + .../invalid-syntax/migrated_0165/actual.js | 1 + .../migrated_0165/expected.json | 100 +++ .../invalid-syntax/migrated_0165/options.json | 3 + .../invalid-syntax/migrated_0166/actual.js | 1 + .../migrated_0166/expected.json | 100 +++ .../invalid-syntax/migrated_0166/options.json | 3 + .../invalid-syntax/migrated_0167/actual.js | 1 + .../migrated_0167/expected.json | 100 +++ .../invalid-syntax/migrated_0167/options.json | 3 + .../invalid-syntax/migrated_0168/actual.js | 1 + .../invalid-syntax/migrated_0168/options.json | 3 + .../invalid-syntax/migrated_0169/actual.js | 1 + .../migrated_0169/expected.json | 100 +++ .../invalid-syntax/migrated_0169/options.json | 3 + .../invalid-syntax/migrated_0170/actual.js | 1 + .../invalid-syntax/migrated_0170/options.json | 3 + .../invalid-syntax/migrated_0171/actual.js | 1 + .../invalid-syntax/migrated_0171/options.json | 3 + .../invalid-syntax/migrated_0172/actual.js | 1 + .../invalid-syntax/migrated_0172/options.json | 3 + .../invalid-syntax/migrated_0173/actual.js | 1 + .../invalid-syntax/migrated_0173/options.json | 3 + .../invalid-syntax/migrated_0174/actual.js | 1 + .../invalid-syntax/migrated_0174/options.json | 3 + .../invalid-syntax/migrated_0175/actual.js | 1 + .../invalid-syntax/migrated_0175/options.json | 3 + .../invalid-syntax/migrated_0176/actual.js | 1 + .../invalid-syntax/migrated_0176/options.json | 3 + .../invalid-syntax/migrated_0177/actual.js | 1 + .../invalid-syntax/migrated_0177/options.json | 3 + .../invalid-syntax/migrated_0178/actual.js | 1 + .../invalid-syntax/migrated_0178/options.json | 3 + .../invalid-syntax/migrated_0179/actual.js | 1 + .../invalid-syntax/migrated_0179/options.json | 3 + .../invalid-syntax/migrated_0180/actual.js | 1 + .../invalid-syntax/migrated_0180/options.json | 3 + .../invalid-syntax/migrated_0181/actual.js | 1 + .../invalid-syntax/migrated_0181/options.json | 3 + .../invalid-syntax/migrated_0182/actual.js | 1 + .../invalid-syntax/migrated_0182/options.json | 3 + .../invalid-syntax/migrated_0183/actual.js | 1 + .../invalid-syntax/migrated_0183/options.json | 3 + .../invalid-syntax/migrated_0184/actual.js | 1 + .../invalid-syntax/migrated_0184/options.json | 3 + .../invalid-syntax/migrated_0185/actual.js | 1 + .../invalid-syntax/migrated_0185/options.json | 3 + .../invalid-syntax/migrated_0186/actual.js | 1 + .../invalid-syntax/migrated_0186/options.json | 3 + .../invalid-syntax/migrated_0187/actual.js | 1 + .../invalid-syntax/migrated_0187/options.json | 3 + .../invalid-syntax/migrated_0188/actual.js | 1 + .../invalid-syntax/migrated_0188/options.json | 3 + .../invalid-syntax/migrated_0189/actual.js | 1 + .../invalid-syntax/migrated_0189/options.json | 3 + .../invalid-syntax/migrated_0190/actual.js | 1 + .../invalid-syntax/migrated_0190/options.json | 3 + .../invalid-syntax/migrated_0191/actual.js | 1 + .../invalid-syntax/migrated_0191/options.json | 3 + .../invalid-syntax/migrated_0192/actual.js | 1 + .../invalid-syntax/migrated_0192/options.json | 3 + .../invalid-syntax/migrated_0193/actual.js | 1 + .../invalid-syntax/migrated_0193/options.json | 3 + .../invalid-syntax/migrated_0194/actual.js | 1 + .../invalid-syntax/migrated_0194/options.json | 3 + .../invalid-syntax/migrated_0195/actual.js | 1 + .../invalid-syntax/migrated_0195/options.json | 3 + .../invalid-syntax/migrated_0196/actual.js | 1 + .../invalid-syntax/migrated_0196/options.json | 3 + .../invalid-syntax/migrated_0197/actual.js | 1 + .../invalid-syntax/migrated_0197/options.json | 3 + .../invalid-syntax/migrated_0198/actual.js | 1 + .../invalid-syntax/migrated_0198/options.json | 3 + .../invalid-syntax/migrated_0199/actual.js | 1 + .../invalid-syntax/migrated_0199/options.json | 3 + .../invalid-syntax/migrated_0200/actual.js | 1 + .../invalid-syntax/migrated_0200/options.json | 3 + .../invalid-syntax/migrated_0201/actual.js | 1 + .../migrated_0201/expected.json | 117 ++++ .../invalid-syntax/migrated_0201/options.json | 3 + .../invalid-syntax/migrated_0202/actual.js | 1 + .../migrated_0202/expected.json | 117 ++++ .../invalid-syntax/migrated_0202/options.json | 3 + .../invalid-syntax/migrated_0203/actual.js | 1 + .../invalid-syntax/migrated_0203/options.json | 3 + .../invalid-syntax/migrated_0204/actual.js | 1 + .../invalid-syntax/migrated_0204/options.json | 3 + .../invalid-syntax/migrated_0205/actual.js | 1 + .../migrated_0205/expected.json | 149 +++++ .../invalid-syntax/migrated_0205/options.json | 3 + .../invalid-syntax/migrated_0206/actual.js | 1 + .../migrated_0206/expected.json | 149 +++++ .../invalid-syntax/migrated_0206/options.json | 3 + .../invalid-syntax/migrated_0207/actual.js | 1 + .../invalid-syntax/migrated_0207/options.json | 3 + .../invalid-syntax/migrated_0208/actual.js | 1 + .../migrated_0208/expected.json | 149 +++++ .../invalid-syntax/migrated_0208/options.json | 3 + .../invalid-syntax/migrated_0209/actual.js | 1 + .../invalid-syntax/migrated_0209/options.json | 3 + .../invalid-syntax/migrated_0210/actual.js | 1 + .../invalid-syntax/migrated_0210/options.json | 3 + .../invalid-syntax/migrated_0211/actual.js | 1 + .../invalid-syntax/migrated_0211/options.json | 3 + .../invalid-syntax/migrated_0212/actual.js | 1 + .../migrated_0212/expected.json | 134 +++++ .../invalid-syntax/migrated_0212/options.json | 3 + .../invalid-syntax/migrated_0213/actual.js | 1 + .../migrated_0213/expected.json | 134 +++++ .../invalid-syntax/migrated_0213/options.json | 3 + .../invalid-syntax/migrated_0214/actual.js | 1 + .../invalid-syntax/migrated_0214/options.json | 3 + .../invalid-syntax/migrated_0215/actual.js | 1 + .../invalid-syntax/migrated_0215/options.json | 3 + .../invalid-syntax/migrated_0216/actual.js | 1 + .../migrated_0216/expected.json | 99 +++ .../invalid-syntax/migrated_0216/options.json | 3 + .../invalid-syntax/migrated_0217/actual.js | 1 + .../invalid-syntax/migrated_0217/options.json | 3 + .../invalid-syntax/migrated_0218/actual.js | 1 + .../invalid-syntax/migrated_0218/options.json | 3 + .../invalid-syntax/migrated_0219/actual.js | 1 + .../invalid-syntax/migrated_0219/options.json | 3 + .../invalid-syntax/migrated_0220/actual.js | 1 + .../invalid-syntax/migrated_0220/options.json | 3 + .../invalid-syntax/migrated_0221/actual.js | 1 + .../migrated_0221/expected.json | 150 +++++ .../invalid-syntax/migrated_0221/options.json | 3 + .../invalid-syntax/migrated_0222/actual.js | 1 + .../migrated_0222/expected.json | 183 ++++++ .../invalid-syntax/migrated_0222/options.json | 3 + .../invalid-syntax/migrated_0223/actual.js | 1 + .../invalid-syntax/migrated_0223/options.json | 3 + .../invalid-syntax/migrated_0224/actual.js | 1 + .../invalid-syntax/migrated_0224/options.json | 3 + .../invalid-syntax/migrated_0225/actual.js | 1 + .../invalid-syntax/migrated_0225/options.json | 3 + .../invalid-syntax/migrated_0226/actual.js | 1 + .../invalid-syntax/migrated_0226/options.json | 3 + .../invalid-syntax/migrated_0227/actual.js | 1 + .../invalid-syntax/migrated_0227/options.json | 3 + .../invalid-syntax/migrated_0228/actual.js | 1 + .../invalid-syntax/migrated_0228/options.json | 3 + .../invalid-syntax/migrated_0229/actual.js | 1 + .../invalid-syntax/migrated_0229/options.json | 3 + .../invalid-syntax/migrated_0230/actual.js | 1 + .../invalid-syntax/migrated_0230/options.json | 3 + .../invalid-syntax/migrated_0231/actual.js | 1 + .../invalid-syntax/migrated_0231/options.json | 3 + .../invalid-syntax/migrated_0232/actual.js | 1 + .../invalid-syntax/migrated_0232/options.json | 3 + .../invalid-syntax/migrated_0233/actual.js | 1 + .../migrated_0233/expected.json | 134 +++++ .../invalid-syntax/migrated_0233/options.json | 3 + .../invalid-syntax/migrated_0234/actual.js | 1 + .../migrated_0234/expected.json | 117 ++++ .../invalid-syntax/migrated_0234/options.json | 3 + .../invalid-syntax/migrated_0235/actual.js | 1 + .../migrated_0235/expected.json | 134 +++++ .../invalid-syntax/migrated_0235/options.json | 3 + .../invalid-syntax/migrated_0236/actual.js | 1 + .../migrated_0236/expected.json | 134 +++++ .../invalid-syntax/migrated_0236/options.json | 3 + .../invalid-syntax/migrated_0238/actual.js | 1 + .../migrated_0238/expected.json | 83 +++ .../invalid-syntax/migrated_0238/options.json | 3 + .../invalid-syntax/migrated_0239/actual.js | 1 + .../invalid-syntax/migrated_0239/options.json | 3 + .../invalid-syntax/migrated_0240/actual.js | 1 + .../invalid-syntax/migrated_0240/options.json | 3 + .../invalid-syntax/migrated_0241/actual.js | 1 + .../migrated_0241/expected.json | 134 +++++ .../invalid-syntax/migrated_0241/options.json | 3 + .../invalid-syntax/migrated_0242/actual.js | 1 + .../migrated_0242/expected.json | 134 +++++ .../invalid-syntax/migrated_0242/options.json | 3 + .../invalid-syntax/migrated_0243/actual.js | 1 + .../invalid-syntax/migrated_0243/options.json | 3 + .../invalid-syntax/migrated_0244/actual.js | 1 + .../invalid-syntax/migrated_0244/options.json | 3 + .../invalid-syntax/migrated_0245/actual.js | 1 + .../invalid-syntax/migrated_0245/options.json | 3 + .../invalid-syntax/migrated_0246/actual.js | 1 + .../migrated_0246/expected.json | 150 +++++ .../invalid-syntax/migrated_0246/options.json | 3 + .../invalid-syntax/migrated_0247/actual.js | 1 + .../migrated_0247/expected.json | 150 +++++ .../invalid-syntax/migrated_0247/options.json | 3 + .../invalid-syntax/migrated_0248/actual.js | 1 + .../invalid-syntax/migrated_0248/options.json | 3 + .../invalid-syntax/migrated_0249/actual.js | 1 + .../invalid-syntax/migrated_0249/options.json | 3 + .../invalid-syntax/migrated_0250/actual.js | 1 + .../invalid-syntax/migrated_0250/options.json | 3 + .../invalid-syntax/migrated_0252/actual.js | 1 + .../invalid-syntax/migrated_0252/options.json | 3 + .../invalid-syntax/migrated_0253/actual.js | 1 + .../migrated_0253/expected.json | 64 ++ .../invalid-syntax/migrated_0253/options.json | 3 + .../invalid-syntax/migrated_0254/actual.js | 1 + .../invalid-syntax/migrated_0254/options.json | 3 + .../invalid-syntax/migrated_0255/actual.js | 1 + .../invalid-syntax/migrated_0255/options.json | 3 + .../invalid-syntax/migrated_0256/actual.js | 1 + .../invalid-syntax/migrated_0256/options.json | 3 + .../invalid-syntax/migrated_0257/actual.js | 1 + .../invalid-syntax/migrated_0257/options.json | 3 + .../invalid-syntax/migrated_0258/actual.js | 1 + .../invalid-syntax/migrated_0258/options.json | 3 + .../invalid-syntax/migrated_0259/actual.js | 1 + .../invalid-syntax/migrated_0259/options.json | 3 + .../invalid-syntax/migrated_0260/actual.js | 1 + .../invalid-syntax/migrated_0260/options.json | 3 + .../invalid-syntax/migrated_0261/actual.js | 1 + .../invalid-syntax/migrated_0261/options.json | 3 + .../invalid-syntax/migrated_0262/actual.js | 1 + .../invalid-syntax/migrated_0262/options.json | 3 + .../invalid-syntax/migrated_0263/actual.js | 1 + .../invalid-syntax/migrated_0263/options.json | 3 + .../invalid-syntax/migrated_0264/actual.js | 1 + .../invalid-syntax/migrated_0264/options.json | 3 + .../invalid-syntax/migrated_0265/actual.js | 1 + .../invalid-syntax/migrated_0265/options.json | 3 + .../invalid-syntax/migrated_0266/actual.js | 1 + .../invalid-syntax/migrated_0266/options.json | 3 + .../invalid-syntax/migrated_0267/actual.js | 1 + .../invalid-syntax/migrated_0267/options.json | 3 + .../invalid-syntax/migrated_0268/actual.js | 1 + .../invalid-syntax/migrated_0268/options.json | 3 + .../invalid-syntax/migrated_0269/actual.js | 1 + .../invalid-syntax/migrated_0269/options.json | 3 + .../invalid-syntax/migrated_0270/actual.js | 1 + .../migrated_0270/expected.json | 151 +++++ .../invalid-syntax/migrated_0270/options.json | 3 + .../invalid-syntax/migrated_0271/actual.js | 1 + .../migrated_0271/expected.json | 153 +++++ .../invalid-syntax/migrated_0271/options.json | 3 + .../invalid-syntax/migrated_0272/actual.js | 1 + .../invalid-syntax/migrated_0272/options.json | 3 + .../invalid-syntax/migrated_0273/actual.js | 1 + .../invalid-syntax/migrated_0273/options.json | 3 + .../invalid-syntax/migrated_0274/actual.js | 1 + .../invalid-syntax/migrated_0274/options.json | 3 + .../invalid-syntax/migrated_0275/actual.js | 1 + .../invalid-syntax/migrated_0275/options.json | 3 + .../invalid-syntax/migrated_0276/actual.js | 1 + .../invalid-syntax/migrated_0276/options.json | 3 + .../invalid-syntax/migrated_0277/actual.js | 1 + .../migrated_0277/expected.json | 168 ++++++ .../invalid-syntax/migrated_0277/options.json | 3 + .../invalid-syntax/migrated_0278/actual.js | 1 + .../migrated_0278/expected.json | 151 +++++ .../invalid-syntax/migrated_0278/options.json | 3 + .../statement-block/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 81 +++ .../statement-block/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 144 +++++ .../statement-block/migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 49 ++ .../statement-break/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 99 +++ .../statement-break/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 145 +++++ .../statement-break/migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 145 +++++ .../statement-break/migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 145 +++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 99 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 99 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 145 +++++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 145 +++++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 145 +++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 48 ++ .../statement-empty/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 48 ++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 64 ++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 97 +++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 100 +++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 100 +++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 100 +++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 100 +++ .../statement-if/migrated_0000/actual.js | 1 + .../statement-if/migrated_0000/expected.json | 112 ++++ .../statement-if/migrated_0001/actual.js | 1 + .../statement-if/migrated_0001/expected.json | 116 ++++ .../statement-if/migrated_0002/actual.js | 1 + .../statement-if/migrated_0002/expected.json | 132 ++++ .../statement-if/migrated_0003/actual.js | 1 + .../statement-if/migrated_0004/actual.js | 1 + .../statement-if/migrated_0004/expected.json | 158 +++++ .../statement-if/migrated_0005/actual.js | 2 + .../statement-if/migrated_0005/expected.json | 128 ++++ .../statement-if/migrated_0006/actual.js | 1 + .../statement-if/migrated_0006/expected.json | 128 ++++ .../statement-iteration/const_forin/actual.js | 1 + .../const_forin/expected.json | 178 ++++++ .../for-statement-with-seq/actual.js | 1 + .../for-statement-with-seq/expected.json | 130 ++++ .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 113 ++++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 113 ++++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 211 +++++++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 132 ++++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 113 ++++ .../migrated_0005/actual.js | 2 + .../migrated_0005/expected.json | 113 ++++ .../migrated_0006/actual.js | 1 + .../migrated_0006/expected.json | 113 ++++ .../migrated_0007/actual.js | 1 + .../migrated_0007/expected.json | 211 +++++++ .../migrated_0008/actual.js | 1 + .../migrated_0008/expected.json | 66 ++ .../migrated_0009/actual.js | 1 + .../migrated_0009/expected.json | 67 +++ .../migrated_0010/actual.js | 1 + .../migrated_0010/expected.json | 115 ++++ .../migrated_0011/actual.js | 1 + .../migrated_0011/expected.json | 132 ++++ .../migrated_0012/actual.js | 1 + .../migrated_0012/expected.json | 132 ++++ .../migrated_0013/actual.js | 1 + .../migrated_0013/expected.json | 181 ++++++ .../migrated_0014/actual.js | 1 + .../migrated_0014/expected.json | 164 +++++ .../migrated_0015/actual.js | 1 + .../migrated_0015/expected.json | 196 ++++++ .../migrated_0016/actual.js | 1 + .../migrated_0016/expected.json | 245 ++++++++ .../migrated_0017/actual.js | 1 + .../migrated_0017/expected.json | 144 +++++ .../migrated_0018/actual.js | 1 + .../migrated_0018/expected.json | 178 ++++++ .../migrated_0019/actual.js | 1 + .../migrated_0019/expected.json | 195 ++++++ .../migrated_0020/actual.js | 1 + .../migrated_0020/expected.json | 178 ++++++ .../migrated_0021/actual.js | 1 + .../migrated_0021/expected.json | 176 ++++++ .../migrated_0022/actual.js | 1 + .../migrated_0022/expected.json | 241 ++++++++ .../migrated_0023/actual.js | 1 + .../migrated_0023/expected.json | 278 +++++++++ .../migrated_0024/actual.js | 1 + .../migrated_0024/expected.json | 159 +++++ .../migrated_0025/actual.js | 1 + .../migrated_0025/expected.json | 194 ++++++ .../migrated_0026/actual.js | 1 + .../migrated_0026/expected.json | 127 ++++ .../pattern-in-for-in/actual.js | 1 + .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 113 ++++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 128 ++++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 95 +++ .../statement-return/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 101 ++++ .../statement-return/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 101 ++++ .../statement-return/migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 116 ++++ .../statement-return/migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 148 +++++ .../statement-switch/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 65 ++ .../statement-switch/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 164 +++++ .../statement-switch/migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 198 ++++++ .../statement-throw/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 64 ++ .../statement-throw/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 96 +++ .../statement-throw/migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 118 ++++ .../statement-try/migrated_0000/actual.js | 1 + .../statement-try/migrated_0000/expected.json | 113 ++++ .../statement-try/migrated_0001/actual.js | 1 + .../statement-try/migrated_0001/expected.json | 113 ++++ .../statement-try/migrated_0002/actual.js | 1 + .../statement-try/migrated_0002/expected.json | 113 ++++ .../statement-try/migrated_0003/actual.js | 1 + .../statement-try/migrated_0003/expected.json | 178 ++++++ .../statement-try/migrated_0004/actual.js | 1 + .../statement-try/migrated_0004/expected.json | 147 +++++ .../statement-try/migrated_0005/actual.js | 1 + .../statement-try/migrated_0005/expected.json | 226 +++++++ .../statement-try/migrated_0006/actual.js | 1 + .../statement-try/migrated_0006/expected.json | 306 ++++++++++ .../complex-pattern-requires-init/actual.js | 1 + .../options.json | 3 + .../migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 83 +++ .../migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 115 ++++ .../migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 100 +++ .../migrated_0003/actual.js | 1 + .../migrated_0003/expected.json | 149 +++++ .../migrated_0004/actual.js | 1 + .../migrated_0004/expected.json | 198 ++++++ .../migrated_0005/actual.js | 1 + .../migrated_0005/expected.json | 147 +++++ .../migrated_0006/actual.js | 1 + .../migrated_0006/expected.json | 179 ++++++ .../statement-with/migrated_0000/actual.js | 1 + .../migrated_0000/expected.json | 127 ++++ .../statement-with/migrated_0001/actual.js | 1 + .../migrated_0001/expected.json | 127 ++++ .../statement-with/migrated_0002/actual.js | 1 + .../migrated_0002/expected.json | 144 +++++ .../async-functions/illegal-parens/actual.js | 1 + .../illegal-parens/options.json | 3 + .../actual.js | 1 + .../expected.json | 166 +++++ .../options.json | 3 + .../arrow-functions/inner-parens/actual.js | 1 + .../arrow-functions/inner-parens/options.json | 3 + .../harmony/uncategorised/289/expected.json | 187 ++++++ .../harmony/uncategorised/297/expected.json | 167 +++++ 2091 files changed, 82939 insertions(+), 111 deletions(-) create mode 100644 test/fixtures/core/uncategorised/484/expected.json create mode 100644 test/fixtures/core/uncategorised/485/expected.json create mode 100644 test/fixtures/core/uncategorised/488/expected.json create mode 100644 test/fixtures/core/uncategorised/489/expected.json create mode 100644 test/fixtures/core/uncategorised/491/expected.json create mode 100644 test/fixtures/core/uncategorised/495/expected.json create mode 100644 test/fixtures/core/uncategorised/496/expected.json create mode 100644 test/fixtures/core/uncategorised/511/expected.json create mode 100644 test/fixtures/core/uncategorised/512/expected.json create mode 100644 test/fixtures/core/uncategorised/515/expected.json create mode 100644 test/fixtures/core/uncategorised/516/expected.json create mode 100644 test/fixtures/core/uncategorised/520/expected.json create mode 100644 test/fixtures/core/uncategorised/521/expected.json create mode 100644 test/fixtures/core/uncategorised/536/expected.json create mode 100644 test/fixtures/esprima/LICENSE create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0013/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0013/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/actual.js create mode 100644 test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json create mode 100644 test/fixtures/esprima/declaration-const/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/declaration-const/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/declaration-const/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/declaration-const/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/declaration-const/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/declaration-const/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/declaration-function/dupe-param/actual.js create mode 100644 test/fixtures/esprima/declaration-function/empty-param/actual.js create mode 100644 test/fixtures/esprima/declaration-function/empty-param/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0007/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0007/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0008/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0008/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0009/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0009/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0010/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0010/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0011/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0011/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0012/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0012/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0013/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0013/expected.json create mode 100644 test/fixtures/esprima/declaration-function/migrated_0014/actual.js create mode 100644 test/fixtures/esprima/declaration-function/migrated_0014/expected.json create mode 100644 test/fixtures/esprima/declaration-let/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/declaration-let/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/declaration-let/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/declaration-let/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/declaration-let/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/declaration-let/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/declaration-let/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/declaration-let/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/directive-prolog/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/directive-prolog/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/directive-prolog/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/directive-prolog/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/actual.js create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/actual.js create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/actual.js create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/actual.js create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/elision/actual.js create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/actual.js create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/expected.json create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/options.json create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/invalid-elision-after-rest/actual.js create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/invalid-elision-after-rest/expected.json create mode 100644 test/fixtures/esprima/es2015-array-binding-pattern/invalid-elision-after-rest/options.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/dupe-param-1/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/dupe-param-2/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/dupe-param-3/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/elision/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/elision/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/empty-pattern-catch-param/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/empty-pattern-catch-param/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/empty-pattern-fn/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/empty-pattern-fn/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/empty-pattern-lexical/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/empty-pattern-lexical/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/hole/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/hole/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/nested-pattern/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/patterned-catch/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/rest/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/rest/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/rest/options.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/tailing-hold/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/options.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/with-default-fn/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/with-object-pattern/actual.js create mode 100644 test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/options.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/options.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/invalid-line-terminator-arrow/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/invalid-line-terminator-arrow/options.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/options.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0007/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0008/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0009/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0010/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0011/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0012/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0013/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0014/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0015/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0016/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0017/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0018/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0018/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0019/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0019/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0020/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/migrated_0020/expected.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-arrow/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-arrow/options.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-rest/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-rest/options.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/expected.json create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-member-expr.failure.json create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-member-expr.js create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-method-in-pattern.failure.json create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-method-in-pattern.js create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-nested-param.failure.json create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-nested-param.js create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-pattern-without-parenthesis.failure.json create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-pattern-without-parenthesis.js create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-rest-in-object-pattern.failure.json create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/invalid-rest-in-object-pattern.js create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/nested-cover-grammar.js create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/object-binding-pattern-01.js create mode 100755 test/fixtures/esprima/es2015-arrow-function/object-binding-pattern/object-binding-pattern-empty.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/param-with-rest-without-arrow/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/param-with-rest-without-arrow/options.json create mode 100644 test/fixtures/esprima/es2015-arrow-function/rest-without-arrow/actual.js create mode 100644 test/fixtures/esprima/es2015-arrow-function/rest-without-arrow/options.json create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0007/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0007/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0008/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0008/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0009/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0009/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0010/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0010/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0011/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0011/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0012/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0012/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0013/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0013/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0014/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0014/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0015/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0015/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0016/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0016/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0017/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0017/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0018/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0018/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0019/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0019/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0020/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0020/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0021/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0021/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0022/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0022/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0023/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0023/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0024/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0024/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0025/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0025/expected.json create mode 100644 test/fixtures/esprima/es2015-class/migrated_0026/actual.js create mode 100644 test/fixtures/esprima/es2015-class/migrated_0026/expected.json create mode 100644 test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-01/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-01/options.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-02/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-02/options.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-pattern-with-method/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-pattern-with-method/options.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment/invalid-cover-grammar/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment/invalid-cover-grammar/options.json create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment/invalid-group-assignment/actual.js create mode 100644 test/fixtures/esprima/es2015-destructuring-assignment/invalid-group-assignment/options.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-const-number/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-array/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-array/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-class/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-function/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-named-function/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-named-function/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-number/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-object/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-value/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-default-value/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-batch/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-default/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-function-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-function/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-function/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-let-number/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-as-default/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-as-default/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-empty/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-empty/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-specifier/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-var-anonymous-function/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-var-anonymous-function/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-var-number/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-var/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/export-var/expected.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-missing-from-clause/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-missing-from-clause/options.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-token/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-token/options.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-default-equal/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-default-equal/options.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/options.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-default/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/actual.js create mode 100644 test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/options.json create mode 100644 test/fixtures/esprima/es2015-export-declaration/options.json create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-array-pattern-let/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-array-pattern-let/expected.json create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-array-pattern/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-array-pattern/expected.json create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-object-pattern-const/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-object-pattern-const/expected.json create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-object-pattern/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-object-pattern/expected.json create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-with-const/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-with-const/expected.json create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-with-let/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-with-let/expected.json create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-with-var/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/for-of-with-var/expected.json create mode 100644 test/fixtures/esprima/es2015-for-of/for-of/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/for-of/expected.json create mode 100644 test/fixtures/esprima/es2015-for-of/invalid-const-init/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/invalid-const-init/options.json create mode 100644 test/fixtures/esprima/es2015-for-of/invalid-let-init/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/invalid-let-init/options.json create mode 100644 test/fixtures/esprima/es2015-for-of/invalid-lhs-init/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/invalid-lhs-init/options.json create mode 100644 test/fixtures/esprima/es2015-for-of/invalid-var-init/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/invalid-var-init/expected.json create mode 100644 test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json create mode 100644 test/fixtures/esprima/es2015-for-of/let-of-of/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/let-of-of/expected.json create mode 100644 test/fixtures/esprima/es2015-for-of/unexpected-number/actual.js create mode 100644 test/fixtures/esprima/es2015-for-of/unexpected-number/options.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-declaration-with-params/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-declaration-with-params/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-expression-rest-param/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-expression-with-params/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-expression-with-yield/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-expression/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-computed-name/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-computed-name/options.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/options.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-params/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-yield/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-method/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-method/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/options.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-binding-property-reserved/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-binding-property-reserved/options.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/options.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/options.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-element/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-element/options.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-property/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-property/options.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-invalid-computed-property-name/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-invalid-computed-property-name/options.json create mode 100644 test/fixtures/esprima/es2015-generator/incomplete-yield-delegate/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/incomplete-yield-delegate/options.json create mode 100644 test/fixtures/esprima/es2015-generator/malformed-generator-method-2/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/malformed-generator-method-2/options.json create mode 100644 test/fixtures/esprima/es2015-generator/malformed-generator-method/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/malformed-generator-method/options.json create mode 100644 test/fixtures/esprima/es2015-generator/static-generator-method-with-computed-name/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/static-generator-method-with-computed-name/expected.json create mode 100644 test/fixtures/esprima/es2015-generator/static-generator-method/actual.js create mode 100644 test/fixtures/esprima/es2015-generator/static-generator-method/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/dakuten_handakuten/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/dakuten_handakuten/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_all/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_all/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_math_alef/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_math_alef/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_math_dal_part/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_math_dal_part/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_math_kaf_lam/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_math_kaf_lam/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_math_zain_start/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_math_zain_start/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_part/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_part/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_start/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/escaped_start/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/estimated/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/estimated/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/ethiopic_digits/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/ethiopic_digits/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_escaped_surrogate_pairs/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_escaped_surrogate_pairs/options.json create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_expression_await/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_expression_await/options.json create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_function_wait/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_function_wait/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_function_wait/options.json create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_id_smp/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_id_smp/options.json create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/options.json create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_var_await/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/invalid_var_await/options.json create mode 100644 test/fixtures/esprima/es2015-identifier/math_alef/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/math_alef/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/math_dal_part/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/math_dal_part/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/math_kaf_lam/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/math_kaf_lam/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/math_zain_start/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/math_zain_start/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/module_await/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/module_await/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/valid_await/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/valid_await/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/weierstrass/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/weierstrass/expected.json create mode 100644 test/fixtures/esprima/es2015-identifier/weierstrass_weierstrass/actual.js create mode 100644 test/fixtures/esprima/es2015-identifier/weierstrass_weierstrass/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-default-and-named-specifiers/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-default-as/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-default/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-default/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-jquery/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-module/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-module/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-empty/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named-after-default/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named-after-default/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-default-missing-module-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-default-missing-module-specifier/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-default-module-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-default-module-specifier/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-default/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-default/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-comma/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-comma/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-module-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-module-specifier/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-module-specifier/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-module-specifier/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-named/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-named/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-namespace/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-namespace/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-named-as-missing-from/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-named-as-missing-from/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-after-named/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-after-named/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-missing-as/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-missing-as/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/actual.js create mode 100644 test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/options.json create mode 100644 test/fixtures/esprima/es2015-import-declaration/options.json create mode 100644 test/fixtures/esprima/es2015-lexical-declaration/invalid_complex_binding_without_init/actual.js create mode 100644 test/fixtures/esprima/es2015-lexical-declaration/invalid_complex_binding_without_init/options.json create mode 100644 test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/actual.js create mode 100644 test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/options.json create mode 100644 test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/actual.js create mode 100644 test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/options.json create mode 100644 test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/es2015-meta-property/assign-new-target/actual.js create mode 100644 test/fixtures/esprima/es2015-meta-property/assign-new-target/expected.json create mode 100644 test/fixtures/esprima/es2015-meta-property/invalid-dots/actual.js create mode 100644 test/fixtures/esprima/es2015-meta-property/invalid-dots/options.json create mode 100644 test/fixtures/esprima/es2015-meta-property/invalid-new-target/actual.js create mode 100644 test/fixtures/esprima/es2015-meta-property/invalid-new-target/expected.json create mode 100644 test/fixtures/esprima/es2015-meta-property/invalid-new-target/options.json create mode 100644 test/fixtures/esprima/es2015-meta-property/new-new-target/actual.js create mode 100644 test/fixtures/esprima/es2015-meta-property/new-new-target/expected.json create mode 100644 test/fixtures/esprima/es2015-meta-property/new-target-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-meta-property/new-target-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-meta-property/new-target-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-meta-property/new-target-expression/expected.json create mode 100644 test/fixtures/esprima/es2015-meta-property/new-target-invoke/actual.js create mode 100644 test/fixtures/esprima/es2015-meta-property/new-target-invoke/expected.json create mode 100644 test/fixtures/esprima/es2015-meta-property/new-target-precedence/actual.js create mode 100644 test/fixtures/esprima/es2015-meta-property/new-target-precedence/expected.json create mode 100644 test/fixtures/esprima/es2015-meta-property/unknown-property/actual.js create mode 100644 test/fixtures/esprima/es2015-meta-property/unknown-property/options.json create mode 100644 test/fixtures/esprima/es2015-method-definition/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/es2015-method-definition/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/es2015-method-definition/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/es2015-method-definition/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/es2015-method-definition/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/es2015-method-definition/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/es2015-method-definition/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/es2015-method-definition/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/es2015-method-definition/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-getter-literal-identifier/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-getter-literal-identifier/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-literal/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-literal/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifiers/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifiers/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-identifier/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-identifier/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literals/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literals/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-setter-literal-identifier/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-setter-literal-identifier/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/actual.js create mode 100644 test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json create mode 100644 test/fixtures/esprima/es2015-object-literal-property-value-shorthand/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/es2015-object-literal-property-value-shorthand/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/es2015-object-pattern/elision/actual.js create mode 100644 test/fixtures/esprima/es2015-object-pattern/elision/expected.json create mode 100644 test/fixtures/esprima/es2015-object-pattern/empty-catch-param/actual.js create mode 100644 test/fixtures/esprima/es2015-object-pattern/empty-catch-param/expected.json create mode 100644 test/fixtures/esprima/es2015-object-pattern/empty-fn/actual.js create mode 100644 test/fixtures/esprima/es2015-object-pattern/empty-fn/expected.json create mode 100644 test/fixtures/esprima/es2015-object-pattern/empty-for-lex/actual.js create mode 100644 test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json create mode 100644 test/fixtures/esprima/es2015-object-pattern/empty-lexical/actual.js create mode 100644 test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json create mode 100644 test/fixtures/esprima/es2015-object-pattern/empty-var/actual.js create mode 100644 test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json create mode 100644 test/fixtures/esprima/es2015-object-pattern/nested/actual.js create mode 100644 test/fixtures/esprima/es2015-object-pattern/nested/expected.json create mode 100644 test/fixtures/esprima/es2015-object-pattern/properties/actual.js create mode 100644 test/fixtures/esprima/es2015-object-pattern/properties/expected.json create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/es2015-rest-parameter/function-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-rest-parameter/function-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-rest-parameter/function-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-rest-parameter/function-expression/expected.json create mode 100644 test/fixtures/esprima/es2015-rest-parameter/object-method/actual.js create mode 100644 test/fixtures/esprima/es2015-rest-parameter/object-method/expected.json create mode 100644 test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/actual.js create mode 100644 test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/expected.json create mode 100644 test/fixtures/esprima/es2015-spread-element/call-multi-spread/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/call-multi-spread/expected.json create mode 100644 test/fixtures/esprima/es2015-spread-element/call-spread-default/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/call-spread-default/expected.json create mode 100644 test/fixtures/esprima/es2015-spread-element/call-spread-first/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/call-spread-first/expected.json create mode 100644 test/fixtures/esprima/es2015-spread-element/call-spread-number/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json create mode 100644 test/fixtures/esprima/es2015-spread-element/call-spread/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/call-spread/expected.json create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-call-dot-dot/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-call-dot-dot/options.json create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-call-dots/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-call-dots/options.json create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-call-spreads/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-call-spreads/options.json create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-new-dot-dot/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-new-dot-dot/options.json create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-new-dots/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-new-dots/options.json create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-new-spreads/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/invalid-new-spreads/options.json create mode 100644 test/fixtures/esprima/es2015-spread-element/new-multi-spread/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/new-multi-spread/expected.json create mode 100644 test/fixtures/esprima/es2015-spread-element/new-spread-default/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/new-spread-default/expected.json create mode 100644 test/fixtures/esprima/es2015-spread-element/new-spread-first/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/new-spread-first/expected.json create mode 100644 test/fixtures/esprima/es2015-spread-element/new-spread-number/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json create mode 100644 test/fixtures/esprima/es2015-spread-element/new-spread/actual.js create mode 100644 test/fixtures/esprima/es2015-spread-element/new-spread/expected.json create mode 100644 test/fixtures/esprima/es2015-super-property/arrow_super/actual.js create mode 100644 test/fixtures/esprima/es2015-super-property/arrow_super/expected.json create mode 100644 test/fixtures/esprima/es2015-super-property/constructor_super/actual.js create mode 100644 test/fixtures/esprima/es2015-super-property/constructor_super/expected.json create mode 100644 test/fixtures/esprima/es2015-super-property/invalid_super_access/actual.js create mode 100644 test/fixtures/esprima/es2015-super-property/invalid_super_access/options.json create mode 100644 test/fixtures/esprima/es2015-super-property/invalid_super_id/actual.js create mode 100644 test/fixtures/esprima/es2015-super-property/invalid_super_id/expected.json create mode 100644 test/fixtures/esprima/es2015-super-property/invalid_super_id/options.json create mode 100644 test/fixtures/esprima/es2015-super-property/invalid_super_not_inside_function/actual.js create mode 100644 test/fixtures/esprima/es2015-super-property/invalid_super_not_inside_function/options.json create mode 100644 test/fixtures/esprima/es2015-super-property/new_super/actual.js create mode 100644 test/fixtures/esprima/es2015-super-property/new_super/expected.json create mode 100644 test/fixtures/esprima/es2015-super-property/super_computed/actual.js create mode 100644 test/fixtures/esprima/es2015-super-property/super_computed/expected.json create mode 100644 test/fixtures/esprima/es2015-super-property/super_member/actual.js create mode 100644 test/fixtures/esprima/es2015-super-property/super_member/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/after-switch/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/after-switch/options.json create mode 100644 test/fixtures/esprima/es2015-template-literals/dollar-sign/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/dollar-sign/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/escape-sequences/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/invalid-escape/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/invalid-escape/options.json create mode 100644 test/fixtures/esprima/es2015-template-literals/line-terminators/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/new-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/new-expression/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/octal-literal/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/octal-literal/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/octal-literal/options.json create mode 100644 test/fixtures/esprima/es2015-template-literals/strict-octal-literal/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/strict-octal-literal/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/strict-octal-literal/options.json create mode 100644 test/fixtures/esprima/es2015-template-literals/tagged-interpolation/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/tagged-interpolation/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/tagged-nested-with-object-literal/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/tagged-nested-with-object-literal/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/tagged/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/tagged/expected.json create mode 100644 test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/options.json create mode 100644 test/fixtures/esprima/es2015-template-literals/unclosed-nested/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/unclosed-nested/options.json create mode 100644 test/fixtures/esprima/es2015-template-literals/unclosed/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/unclosed/options.json create mode 100644 test/fixtures/esprima/es2015-template-literals/untagged/actual.js create mode 100644 test/fixtures/esprima/es2015-template-literals/untagged/expected.json create mode 100644 test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-expression/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-declaration/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-name/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-name/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-name/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-parameter/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-rest/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-rest/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-rest/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-function-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-function-declaration/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-lexical-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-lexical-declaration/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-parameter/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-rest/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-rest/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-rest/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/options.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/options.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-array-pattern/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-arrow-concise-body/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-arrow-concise-body/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-arrow-function-body/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-arrow-function-body/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-arrow-parameter-default/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-arrow-parameter-default/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-binding-element/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-binding-element/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-binding-property/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-binding-property/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-call-expression-property/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-call-expression-property/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-catch-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-catch-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-expression-precedence/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-expression-precedence/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-function-declaration-formal-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-function-declaration-formal-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-function-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-function-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-function-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-arrow-concise-body/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-arrow-concise-body/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-arrow-function-body/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-arrow-function-body/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-default-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-default-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-function-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-function-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-function-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-method/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-parameter-object-pattern/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-generator-parameter-object-pattern/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-lexical-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-member-expression-property/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-member-expression-property/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-method/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-method/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-rest-parameter/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-rest-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-strict-binding-property/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-strict-method/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-super-property/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-super-property/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-variable-declaration/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-variable-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-yield-expression-delegate/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-yield-expression-delegate/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/yield-yield-expression/actual.js create mode 100644 test/fixtures/esprima/es2015-yield/yield-yield-expression/expected.json create mode 100644 test/fixtures/esprima/expression-additive/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-additive/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-additive/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-additive/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-additive/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-additive/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0007/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0007/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0008/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0008/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0009/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0009/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0010/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0010/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0011/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0011/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0012/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0012/expected.json create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0013/actual.js create mode 100644 test/fixtures/esprima/expression-assignment/migrated_0013/expected.json create mode 100644 test/fixtures/esprima/expression-binary-bitwise/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-binary-bitwise/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-binary-bitwise/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-binary-bitwise/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-binary-bitwise/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-binary-bitwise/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/expression-binary-logical/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0007/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0007/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0008/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0008/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0009/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0009/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0010/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0010/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0011/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0011/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0012/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0012/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0013/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0013/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0014/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0014/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0015/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0015/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0016/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0016/expected.json create mode 100644 test/fixtures/esprima/expression-binary/migrated_0017/actual.js create mode 100644 test/fixtures/esprima/expression-binary/migrated_0017/expected.json create mode 100644 test/fixtures/esprima/expression-bitwise-shift/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-bitwise-shift/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-bitwise-shift/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-bitwise-shift/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-bitwise-shift/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-bitwise-shift/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-complex/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-complex/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-conditional/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-conditional/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-conditional/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-conditional/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-conditional/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-conditional/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-equality/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-equality/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-equality/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-equality/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-equality/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-equality/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-equality/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/expression-equality/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/expression-grouping/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-grouping/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-grouping/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-grouping/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0007/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0008/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0008/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0009/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0010/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0010/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0011/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0011/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0012/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0012/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0013/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0013/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0014/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0014/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0015/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0016/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0017/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0018/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0019/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0019/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0020/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0020/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0021/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0021/expected.json create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0022/actual.js create mode 100644 test/fixtures/esprima/expression-left-hand-side/migrated_0022/expected.json create mode 100644 test/fixtures/esprima/expression-multiplicative/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-multiplicative/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-multiplicative/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-multiplicative/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-multiplicative/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-multiplicative/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/expression-postfix/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/expression-primary/array/expected.json create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0000.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0001.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0002.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0003.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0004.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0005.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0006.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0007.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0008.source.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0009.source.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0010.source.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0011.source.js create mode 100755 test/fixtures/esprima/expression-primary/array/migrated_0012.source.js create mode 100644 test/fixtures/esprima/expression-primary/literal/expected.json create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0000.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0001.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0002.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0003.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0004.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0005.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0006.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0007.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0008.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0009.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0010.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0011.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0012.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0013.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0014.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0015.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0016.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0017.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0018.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0019.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0020.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0021.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0022.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0023.js create mode 100755 test/fixtures/esprima/expression-primary/literal/numeric/migrated_0024.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0000.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0001.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0002.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0003.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0004.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0005.source.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0006.failure.json create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0006.source.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0007.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0008.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0009.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0010.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0011.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0012.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/migrated_0013.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-4-hex.failure.json create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-4-hex.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-var-hex.failure.json create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-invalid-range-var-hex.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-surrogate-pair.js create mode 100755 test/fixtures/esprima/expression-primary/literal/regular-expression/u-flag-valid-range.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0000.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0001.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0002.source.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0003.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0006.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0007.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0008.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0009.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0010.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0011.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0012.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0013.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0015.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0016.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0017.js create mode 100755 test/fixtures/esprima/expression-primary/literal/string/migrated_0018.js create mode 100644 test/fixtures/esprima/expression-primary/object/expected.json create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0000.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0001.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0002.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0003.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0004.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0005.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0006.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0007.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0008.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0009.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0010.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0011.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0012.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0013.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0014.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0015.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0016.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0017.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0018.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0019.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0020.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0021.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0022.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0023.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0024.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0025.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0026.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0027.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0028.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0029.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0030.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0031.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0032.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0033.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0034.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0035.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0036.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0037.js create mode 100755 test/fixtures/esprima/expression-primary/object/migrated_0038.js create mode 100644 test/fixtures/esprima/expression-primary/other/expected.json create mode 100755 test/fixtures/esprima/expression-primary/other/migrated_0000.js create mode 100755 test/fixtures/esprima/expression-primary/other/migrated_0001.js create mode 100755 test/fixtures/esprima/expression-primary/other/migrated_0002.js create mode 100755 test/fixtures/esprima/expression-primary/other/migrated_0003.js create mode 100644 test/fixtures/esprima/expression-relational/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-relational/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-relational/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-relational/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-relational/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-relational/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-relational/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/expression-relational/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/expression-relational/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/expression-relational/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/expression-relational/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/expression-relational/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/expression-relational/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/expression-relational/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0007/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0007/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0008/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0008/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0009/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0009/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0010/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0010/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0011/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0011/expected.json create mode 100644 test/fixtures/esprima/expression-unary/migrated_0012/actual.js create mode 100644 test/fixtures/esprima/expression-unary/migrated_0012/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-00/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-00/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-01/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-01/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-02/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-02/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-03/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-03/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-04/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-04/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-05/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-05/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-06/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-06/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-07/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-07/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-09/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-09/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/GH-1106-09/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0000/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0001/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0002/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0003/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0004/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0005/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0006/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0007/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0007/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0008/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0008/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0009/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0009/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0010/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0010/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0011/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0011/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0012/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0012/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0013/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0013/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0014/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0014/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0015/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0015/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0016/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0016/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0017/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0017/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0018/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0018/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0019/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0019/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0020/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0020/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0021/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0021/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0022/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0022/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0023/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0023/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0024/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0024/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0025/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0025/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0026/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0026/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0027/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0027/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0028/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0028/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0029/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0029/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0030/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0030/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0031/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0031/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0032/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0032/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0033/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0033/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0033/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0034/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0034/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0034/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0035/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0035/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0036/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0036/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0036/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0037/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0037/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0037/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0038/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0038/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0039/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0039/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0040/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0040/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0041/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0041/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0041/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0042/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0042/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0042/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0043/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0043/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0043/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0044/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0044/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0044/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0045/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0045/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0046/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0046/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0047/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0047/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0048/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0048/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0048/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0049/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0049/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0049/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0050/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0050/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0050/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0051/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0051/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0051/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0052/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0052/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0053/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0053/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0054/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0054/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0055/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0055/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0056/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0056/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0057/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0057/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0058/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0058/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0059/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0059/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0060/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0060/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0061/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0061/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0062/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0062/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0063/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0063/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0064/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0064/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0065/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0065/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0066/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0066/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0067/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0067/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0068/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0068/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0069/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0069/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0070/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0070/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0071/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0071/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0072/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0072/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0073/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0073/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0074/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0074/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0075/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0075/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0076/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0076/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0077/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0077/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0078/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0078/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0080/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0080/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0081/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0081/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0082/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0082/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0083/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0083/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0084/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0084/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0085/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0085/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0086/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0086/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0087/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0087/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0088/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0088/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0089/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0089/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0090/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0090/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0091/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0091/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0092/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0092/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0092/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0093/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0093/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0094/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0094/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0095/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0095/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0096/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0096/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0097/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0097/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0098/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0098/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0099/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0099/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0100/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0100/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0101/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0101/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0101/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0102/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0102/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0103/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0103/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0104/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0104/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0105/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0105/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0106/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0106/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0107/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0107/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0108/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0108/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0109/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0109/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0110/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0110/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0111/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0111/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0112/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0112/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0113/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0113/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0114/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0114/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0115/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0115/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0116/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0116/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0117/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0117/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0118/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0118/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0119/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0119/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0120/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0120/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0121/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0121/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0122/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0122/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0123/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0123/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0124/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0124/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0125/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0125/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0126/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0126/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0127/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0127/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0128/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0128/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0129/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0129/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0130/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0130/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0131/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0131/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0132/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0132/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0133/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0133/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0134/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0134/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0135/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0135/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0136/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0136/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0137/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0137/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0137/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0138/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0138/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0138/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0139/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0139/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0139/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0140/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0140/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0140/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0141/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0141/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0142/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0142/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0143/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0143/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0144/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0144/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0145/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0145/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0146/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0146/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0147/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0147/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0148/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0148/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0149/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0149/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0150/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0150/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0151/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0151/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0152/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0152/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0153/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0153/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0154/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0154/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0155/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0155/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0156/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0156/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0157/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0157/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0158/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0158/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0159/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0159/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0160/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0160/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0161/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0161/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0162/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0162/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0163/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0163/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0163/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0164/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0164/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0165/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0165/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0165/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0166/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0166/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0166/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0167/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0167/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0167/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0168/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0168/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0169/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0169/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0169/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0170/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0170/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0171/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0171/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0172/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0172/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0173/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0173/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0174/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0174/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0175/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0175/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0176/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0176/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0177/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0177/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0178/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0178/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0179/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0179/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0180/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0180/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0181/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0181/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0182/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0182/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0183/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0183/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0184/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0184/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0185/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0185/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0186/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0186/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0187/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0187/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0188/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0188/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0189/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0189/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0190/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0190/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0191/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0191/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0192/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0192/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0193/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0193/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0194/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0194/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0195/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0195/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0196/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0196/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0197/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0197/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0198/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0198/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0199/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0199/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0200/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0200/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0201/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0201/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0201/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0202/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0202/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0202/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0203/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0203/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0204/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0204/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0205/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0205/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0205/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0206/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0206/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0206/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0207/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0207/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0208/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0208/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0208/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0209/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0209/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0210/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0210/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0211/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0211/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0212/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0212/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0212/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0213/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0213/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0213/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0214/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0214/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0215/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0215/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0216/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0216/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0216/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0217/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0217/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0218/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0218/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0219/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0219/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0220/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0220/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0221/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0221/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0221/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0222/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0222/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0222/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0223/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0223/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0224/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0224/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0225/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0225/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0226/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0226/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0227/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0227/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0228/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0228/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0229/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0229/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0230/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0230/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0231/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0231/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0232/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0232/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0233/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0233/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0233/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0234/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0234/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0234/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0235/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0235/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0235/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0236/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0236/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0236/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0238/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0238/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0238/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0239/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0239/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0240/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0240/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0241/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0241/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0241/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0242/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0242/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0242/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0243/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0243/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0244/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0244/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0245/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0245/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0246/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0246/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0246/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0247/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0247/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0247/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0248/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0248/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0249/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0249/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0250/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0250/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0252/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0252/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0253/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0253/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0253/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0254/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0254/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0255/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0255/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0256/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0256/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0257/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0257/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0258/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0258/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0259/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0259/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0260/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0260/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0261/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0261/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0262/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0262/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0263/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0263/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0264/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0264/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0265/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0265/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0266/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0266/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0267/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0267/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0268/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0268/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0269/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0269/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0270/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0270/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0270/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0271/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0271/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0271/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0272/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0272/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0273/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0273/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0274/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0274/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0275/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0275/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0276/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0276/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0277/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0277/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0277/options.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0278/actual.js create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0278/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0278/options.json create mode 100644 test/fixtures/esprima/statement-block/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-block/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-block/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-block/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-block/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-block/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-break/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-break/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-break/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-break/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-break/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-break/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-break/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/statement-break/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/statement-continue/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-continue/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-continue/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-continue/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-continue/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-continue/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-continue/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/statement-continue/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/statement-continue/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/statement-continue/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/statement-debugger/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-debugger/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-empty/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-empty/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-expression/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-expression/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-expression/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-expression/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-expression/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-expression/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-expression/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/statement-expression/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/statement-expression/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/statement-expression/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/statement-expression/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/statement-expression/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/statement-if/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-if/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-if/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-if/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-if/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-if/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-if/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/statement-if/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/statement-if/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/statement-if/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/statement-if/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/statement-if/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/statement-if/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/const_forin/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/const_forin/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/for-statement-with-seq/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/for-statement-with-seq/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0007/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0007/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0008/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0008/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0009/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0009/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0010/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0010/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0011/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0011/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0012/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0012/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0013/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0013/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0014/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0014/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0015/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0015/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0016/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0016/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0017/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0017/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0018/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0018/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0019/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0019/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0020/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0020/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0021/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0021/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0022/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0022/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0023/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0023/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0024/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0024/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0025/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0025/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0026/actual.js create mode 100644 test/fixtures/esprima/statement-iteration/migrated_0026/expected.json create mode 100644 test/fixtures/esprima/statement-iteration/pattern-in-for-in/actual.js create mode 100644 test/fixtures/esprima/statement-labelled/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-labelled/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-labelled/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-labelled/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-labelled/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-labelled/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-return/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-return/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-return/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-return/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-return/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-return/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-return/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/statement-return/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/statement-switch/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-switch/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-switch/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-switch/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-switch/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-switch/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-throw/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-throw/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-throw/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-throw/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-throw/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-throw/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-try/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-try/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-try/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-try/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-try/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-try/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-try/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/statement-try/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/statement-try/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/statement-try/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/statement-try/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/statement-try/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/statement-try/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/statement-try/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/statement-variable/complex-pattern-requires-init/actual.js create mode 100644 test/fixtures/esprima/statement-variable/complex-pattern-requires-init/options.json create mode 100644 test/fixtures/esprima/statement-variable/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-variable/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-variable/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-variable/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-variable/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-variable/migrated_0002/expected.json create mode 100644 test/fixtures/esprima/statement-variable/migrated_0003/actual.js create mode 100644 test/fixtures/esprima/statement-variable/migrated_0003/expected.json create mode 100644 test/fixtures/esprima/statement-variable/migrated_0004/actual.js create mode 100644 test/fixtures/esprima/statement-variable/migrated_0004/expected.json create mode 100644 test/fixtures/esprima/statement-variable/migrated_0005/actual.js create mode 100644 test/fixtures/esprima/statement-variable/migrated_0005/expected.json create mode 100644 test/fixtures/esprima/statement-variable/migrated_0006/actual.js create mode 100644 test/fixtures/esprima/statement-variable/migrated_0006/expected.json create mode 100644 test/fixtures/esprima/statement-with/migrated_0000/actual.js create mode 100644 test/fixtures/esprima/statement-with/migrated_0000/expected.json create mode 100644 test/fixtures/esprima/statement-with/migrated_0001/actual.js create mode 100644 test/fixtures/esprima/statement-with/migrated_0001/expected.json create mode 100644 test/fixtures/esprima/statement-with/migrated_0002/actual.js create mode 100644 test/fixtures/esprima/statement-with/migrated_0002/expected.json create mode 100644 test/fixtures/experimental/async-functions/illegal-parens/actual.js create mode 100644 test/fixtures/experimental/async-functions/illegal-parens/options.json create mode 100644 test/fixtures/flow/regression/arrow-function-parens-with-return-type/actual.js create mode 100644 test/fixtures/flow/regression/arrow-function-parens-with-return-type/expected.json create mode 100644 test/fixtures/flow/regression/arrow-function-parens-with-return-type/options.json create mode 100644 test/fixtures/harmony/arrow-functions/inner-parens/actual.js create mode 100644 test/fixtures/harmony/arrow-functions/inner-parens/options.json create mode 100644 test/fixtures/harmony/uncategorised/289/expected.json create mode 100644 test/fixtures/harmony/uncategorised/297/expected.json diff --git a/src/options.js b/src/options.js index 5c5d6d50f1..f33e39d920 100755 --- a/src/options.js +++ b/src/options.js @@ -4,11 +4,6 @@ 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, diff --git a/src/parser/expression.js b/src/parser/expression.js index 5faf80afce..3169de84e5 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -229,7 +229,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,10 +245,10 @@ 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.options.features["es7.trailingFunctionCommas"], possibleAsync); base = this.finishNode(node, "CallExpression"); - if (possibleAsync && (this.match(tt.colon) || this.match(tt.arrow))) { + if (possibleAsync && this.shouldParseAsyncArrow()) { base = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node); } else { this.toReferencedList(node.arguments); @@ -264,6 +264,38 @@ 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(); this.expect(tt.arrow); @@ -286,16 +318,51 @@ 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.inFunction) { 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(); + } + 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(); + // NOTE: falls through to _let + if (!this.state.inGenerator && this.strict) this.unexpected(); + + case tt._let: + case tt.name: + node = this.startNode(); + let id = this.parseIdentifier(true); + + if (this.options.features["es7.asyncFunctions"]) { + if (id.name === "await") { + if (this.inAsync) 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.parseIdentifier()]; + this.expect(tt.arrow); + // var foo = bar => {}; + return this.parseArrowExpression(node, params, true); + } + } + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { + return this.parseArrowExpression(node, [id]); + } + + return id; + case tt._do: if (this.options.features["es7.doExpressions"]) { @@ -311,30 +378,6 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { return this.finishNode(node, "DoExpression"); } - case tt.name: - node = this.startNode(); - let id = this.parseIdent(true); - - if (this.options.features["es7.asyncFunctions"]) { - if (id.name === "await") { - if (this.inAsync) 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()]; - this.expect(tt.arrow); - // var foo = bar => {}; - return this.parseArrowExpression(node, params, true); - } - } - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { - return this.parseArrowExpression(node, [id]); - } - - return id; - case tt.regexp: let value = this.state.value; node = this.parseLiteral(value.value); @@ -430,7 +473,7 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow 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; @@ -454,6 +497,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); @@ -497,11 +541,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"); @@ -592,7 +636,7 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) { } if (!isPattern && this.options.features["es7.asyncFunctions"] && this.isContextual("async")) { if (isGenerator) this.unexpected(); - var asyncId = this.parseIdent(); + var asyncId = this.parseIdentifier(); if (this.match(tt.colon) || this.match(tt.parenL) || this.match(tt.braceR)) { prop.key = asyncId; } else { @@ -629,22 +673,27 @@ pp.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync, let paramCount = prop.kind === "get" ? 0 : 1; if (prop.value.params.length !== paramCount) { let start = prop.value.start; - if (prop.kind === "get") + 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"; 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); + var illegalBinding = this.isKeyword(prop.key.name); + if (!illegalBinding && this.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(); @@ -663,7 +712,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); } }; @@ -723,16 +772,19 @@ pp.parseFunctionBody = function (node, allowExpression) { // 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; + var checkLVal = this.strict; + // arrow function + if (allowExpression) checkLVal = true; + // normal function + if (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) checkLVal = true; + if (checkLVal) { + let nameHash = Object.create(null); if (node.id) { this.checkLVal(node.id, true); } for (let param of (node.params: Array)) { this.checkLVal(param, true, nameHash); } - this.strict = oldStrict; } }; @@ -773,19 +825,21 @@ 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 (this.isName()) { + if (!liberal && this.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(); } + this.next(); return this.finishNode(node, "Identifier"); }; diff --git a/src/parser/lval.js b/src/parser/lval.js index b8ee7bc63f..7ec54ae135 100644 --- a/src/parser/lval.js +++ b/src/parser/lval.js @@ -92,17 +92,22 @@ 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(); + if (this.isName() || this.match(tt.bracketL)) { + node.argument = this.parseBindingAtom(); + } else { + this.unexpected(); + } return this.finishNode(node, "RestElement"); }; // Parses lvalue (assignable) atom. pp.parseBindingAtom = function () { - switch (this.state.type) { - case tt.name: - return this.parseIdent(); + if (this.isName()) { + return this.parseIdentifier(true); + } + switch (this.state.type) { case tt.bracketL: let node = this.startNode(); this.next(); @@ -163,8 +168,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.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,7 +186,7 @@ pp.checkLVal = function (expr, isBinding, checkClashes) { break; case "ObjectPattern": - for (let prop of (expr.properties: Array)) { + for (let prop of (expr.properties: Array)) { if (prop.type === "Property") prop = prop.value; this.checkLVal(prop, isBinding, checkClashes); } diff --git a/src/parser/statement.js b/src/parser/statement.js index 8a6744f8c0..559ab8ebda 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -72,8 +72,27 @@ 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: + // NOTE: falls through to _const + if (!this.strict) { + let state = this.state.clone(); + this.next(); + + var isBindingAtomStart = this.isName() || this.match(tt.braceL) || this.match(tt.bracketL); + + // set back lookahead + this.state = state; + + if (!isBindingAtomStart) break; + } + + 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(); @@ -92,7 +111,7 @@ pp.parseStatement = function (declaration, topLevel) { case tt.name: if (this.options.features["es7.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 +120,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); } }; @@ -158,7 +176,7 @@ pp.parseBreakContinueStatement = function (node, keyword) { } else if (!this.match(tt.name)) { this.unexpected(); } else { - node.label = this.parseIdent(); + node.label = this.parseIdentifier(); this.semicolon(); } @@ -487,12 +505,12 @@ pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, op this.initFunction(node, isAsync); node.generator = this.eat(tt.star); - if (isStatement && !optionalId && !this.match(tt.name)) { + if (isStatement && !optionalId && !this.isName()) { this.unexpected(); } - if (this.match(tt.name)) { - node.id = this.parseIdent(); + if (this.isName()) { + node.id = this.parseIdentifier(); } this.parseFunctionParams(node); @@ -613,7 +631,7 @@ pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) { pp.parseClassId = function (node, isStatement, optionalId) { if (this.match(tt.name)) { - node.id = this.parseIdent(); + node.id = this.parseIdentifier(); } else { if (optionalId || !isStatement) { node.id = null; @@ -636,7 +654,7 @@ pp.parseExport = function (node) { let specifier = this.startNode(); this.next(); if (this.options.features["es7.exportExtensions"] && this.eatContextual("as")) { - specifier.exported = this.parseIdent(); + specifier.exported = this.parseIdentifier(); node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; this.parseExportSpecifiersMaybe(node); this.parseExportFrom(node, true); @@ -646,14 +664,14 @@ pp.parseExport = function (node) { } } else if (this.options.features["es7.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); @@ -744,7 +762,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); @@ -756,12 +777,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; }; @@ -791,7 +820,7 @@ pp.parseImportSpecifiers = function (node) { 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)); + node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), startPos, startLoc)); if (!this.eat(tt.comma)) return; } @@ -799,7 +828,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; @@ -815,8 +844,8 @@ 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")); } diff --git a/src/parser/util.js b/src/parser/util.js index 51ca0bdc6f..53f1e4b27d 100644 --- a/src/parser/util.js +++ b/src/parser/util.js @@ -28,6 +28,23 @@ pp.expectRelational = function (op) { } }; +// TODO + +pp.isName = function () { + if (this.match(tt.name)) { + return true; + } else if (!this.strict) { + var keyword = this.state.type.keyword; + if (keyword === "let") { + return true; + } else if (keyword === "yield") { + return !this.state.inGenerator; + } + } + + return false; +}; + // Tests whether parsed token is a contextual keyword. pp.isContextual = function (name) { diff --git a/src/plugins/flow.js b/src/plugins/flow.js index 07c68d55c6..4bc211ccb1 100644 --- a/src/plugins/flow.js +++ b/src/plugins/flow.js @@ -21,7 +21,7 @@ pp.flowParseDeclareClass = function (node) { pp.flowParseDeclareFunction = function (node) { this.next(); - var id = node.id = this.parseIdent(); + var id = node.id = this.parseIdentifier(); var typeNode = this.startNode(); var typeContainer = this.startNode(); @@ -76,7 +76,7 @@ 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(); @@ -100,7 +100,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(); @@ -122,7 +122,7 @@ pp.flowParseInterfaceish = function (node, allowStatic) { pp.flowParseInterfaceExtends = function () { var node = this.startNode(); - node.id = this.parseIdent(); + node.id = this.parseIdentifier(); if (this.isRelational("<")) { node.typeParameters = this.flowParseTypeParameterInstantiation(); } else { @@ -140,7 +140,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(); @@ -193,7 +193,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) { @@ -280,7 +280,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(); } @@ -321,7 +321,7 @@ pp.flowParseGenericType = function (startPos, startLoc, id) { while (this.eat(tt.dot)) { var node2 = this.startNodeAt(startPos, startLoc); node2.qualification = node.id; - node2.id = this.parseIdent(); + node2.id = this.parseIdentifier(); node.id = this.finishNode(node2, "QualifiedTypeIdentifier"); } @@ -356,7 +356,7 @@ pp.flowParseTupleType = function () { pp.flowParseFunctionTypeParam = function () { var optional = false; var node = this.startNode(); - node.name = this.parseIdent(); + node.name = this.parseIdentifier(); if (this.eat(tt.question)) { optional = true; } @@ -417,7 +417,7 @@ pp.flowParsePrimaryType = function () { 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(); @@ -570,7 +570,7 @@ pp.flowParseTypeAnnotation = function () { }; pp.flowParseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOptionalParam) { - var ident = this.parseIdent(); + var ident = this.parseIdentifier(); var isOptionalParam = false; if (canBeOptionalParam && this.eat(tt.question)) { @@ -592,7 +592,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,6 +605,7 @@ 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 @@ -618,6 +619,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 +640,7 @@ export default function (instance) { }; }); + // export type instance.extend("shouldParseExportDeclaration", function (inner) { return function () { return this.isContextual("type") || inner.call(this); @@ -723,6 +726,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 +737,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,6 +749,7 @@ 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++) { @@ -756,6 +762,8 @@ 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++) { @@ -769,6 +777,8 @@ 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(); @@ -784,6 +794,7 @@ export default function (instance) { }; }); + // parse class property type annotations instance.extend("parseClassProperty", function (inner) { return function (node) { if (this.match(tt.colon)) { @@ -793,12 +804,14 @@ 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; @@ -811,6 +824,7 @@ export default function (instance) { }; }); + // parse a the super class type parameters and implements instance.extend("parseClassSuper", function (inner) { return function (node, isStatement) { inner.call(this, node, isStatement); @@ -822,7 +836,7 @@ export default function (instance) { var 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,6 +848,7 @@ export default function (instance) { }; }); + // parse type parameters for object method shorthand instance.extend("parseObjPropValue", function (inner) { return function (prop) { var typeParameters; @@ -866,11 +881,18 @@ 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)); + var kind = null; + if (this.match(tt._typeof)) { + kind = "typeof"; + } else if (this.isContextual("type")) { + kind = "type"; + } if (kind) { var lh = this.lookahead(); if ((lh.type === tt.name && lh.value !== "from") || lh.type === tt.braceL || lh.type === tt.star) { @@ -883,7 +905,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 +915,7 @@ export default function (instance) { }; }); - // var foo: string = bar + // parse flow type annotations on variable declarator heads - var foo: string = bar instance.extend("parseVarHead", function (inner) { return function (decl) { inner.call(this, decl); @@ -904,7 +926,7 @@ export default function (instance) { }; }); - // var foo = (async (): number => {}); + // parse the return type of an async arrow function - var foo = (async (): number => {}); instance.extend("parseAsyncArrowFromCallExpression", function (inner) { return function (node, call) { if (this.match(tt.colon)) { @@ -915,6 +937,14 @@ 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; 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/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/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/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/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/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/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/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/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..bfca2ac2a5 --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/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": "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 + } + }, + "range": [ + 6, + 19 + ] + } + ] + } + ], + "kind": "var" + } + ] + }, + "comments": [ + { + "type": "CommentBlock", + "value": " comment ", + "start": 6, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "range": [ + 6, + 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..54b06ec57a --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json @@ -0,0 +1,197 @@ +{ + "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": "Literal", + "start": 10, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": 14, + "rawValue": 14, + "raw": "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": "Literal", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "value": 3, + "rawValue": 3, + "raw": "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" + } + } + ] + } + ] + } +} \ 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..417879a077 --- /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": "Literal", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": true, + "rawValue": true, + "raw": "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" + } + } + ] + } + } + ] + } +} \ 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..22f542ddac --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json @@ -0,0 +1,198 @@ +{ + "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": "Literal", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": true, + "rawValue": true, + "raw": "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 + } + }, + "range": [ + 24, + 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 + } + }, + "range": [ + 24, + 34 + ] + } + ] + } + ] + } + } + ] + }, + "comments": [ + { + "type": "CommentLine", + "value": " Comment", + "start": 24, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "range": [ + 24, + 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..d4241aabc4 --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json @@ -0,0 +1,198 @@ +{ + "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": "Literal", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": true, + "rawValue": true, + "raw": "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 + } + }, + "range": [ + 24, + 47 + ] + } + ] + }, + { + "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 + } + }, + "range": [ + 24, + 47 + ] + } + ] + } + ] + } + } + ] + }, + "comments": [ + { + "type": "CommentBlock", + "value": " Multiline\nComment ", + "start": 24, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "range": [ + 24, + 47 + ] + } + ] +} \ 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..6f55ed4658 --- /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": "Literal", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": true, + "rawValue": true, + "raw": "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" + } + } + ] + } + } + ] + } +} \ 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..aaf8f84a1d --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json @@ -0,0 +1,198 @@ +{ + "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": "Literal", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": true, + "rawValue": true, + "raw": "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 + } + }, + "range": [ + 21, + 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 + } + }, + "range": [ + 21, + 31 + ] + } + ] + } + ] + } + } + ] + }, + "comments": [ + { + "type": "CommentLine", + "value": " Comment", + "start": 21, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "range": [ + 21, + 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..cae3efe70d --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json @@ -0,0 +1,198 @@ +{ + "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": "Literal", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": true, + "rawValue": true, + "raw": "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 + } + }, + "range": [ + 21, + 44 + ] + } + ] + }, + { + "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 + } + }, + "range": [ + 21, + 44 + ] + } + ] + } + ] + } + } + ] + }, + "comments": [ + { + "type": "CommentBlock", + "value": " Multiline\nComment ", + "start": 21, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "range": [ + 21, + 44 + ] + } + ] +} \ 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..9098864a2b --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json @@ -0,0 +1,132 @@ +{ + "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" + } + } + ] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..8c387c91d1 --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json @@ -0,0 +1,200 @@ +{ + "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 + } + }, + "range": [ + 20, + 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 + } + }, + "range": [ + 20, + 30 + ] + } + ] + } + ] + }, + "parenthesizedExpression": true + } + } + ] + }, + "comments": [ + { + "type": "CommentLine", + "value": " Comment", + "start": 20, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "range": [ + 20, + 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..2eb4083a3c --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json @@ -0,0 +1,200 @@ +{ + "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 + } + }, + "range": [ + 19, + 42 + ] + } + ] + }, + { + "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 + } + }, + "range": [ + 19, + 42 + ] + } + ] + } + ] + }, + "parenthesizedExpression": true + } + } + ] + }, + "comments": [ + { + "type": "CommentBlock", + "value": " Multiline\nComment ", + "start": 19, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "range": [ + 19, + 42 + ] + } + ] +} \ 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..59760cfccf --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json @@ -0,0 +1,181 @@ +{ + "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 + } + }, + "range": [ + 13, + 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 + } + }, + "range": [ + 13, + 23 + ] + } + ] + } + ] + } + ] + }, + "comments": [ + { + "type": "CommentLine", + "value": " Comment", + "start": 13, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "range": [ + 13, + 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..316c90a92c --- /dev/null +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json @@ -0,0 +1,181 @@ +{ + "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 + } + }, + "range": [ + 13, + 36 + ] + } + ] + }, + { + "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 + } + }, + "range": [ + 13, + 36 + ] + } + ] + } + ] + } + ] + }, + "comments": [ + { + "type": "CommentBlock", + "value": " Multiline\nComment ", + "start": 13, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "range": [ + 13, + 36 + ] + } + ] +} \ 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..7a3105b73c --- /dev/null +++ b/test/fixtures/esprima/declaration-const/migrated_0000/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": "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": "Literal", + "start": 10, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ], + "kind": "const" + } + ] + } +} \ 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..80198c2546 --- /dev/null +++ b/test/fixtures/esprima/declaration-const/migrated_0001/expected.json @@ -0,0 +1,117 @@ +{ + "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": "Literal", + "start": 12, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ], + "kind": "const" + } + ] + } + ] + } +} \ 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..79a7b04629 --- /dev/null +++ b/test/fixtures/esprima/declaration-const/migrated_0002/expected.json @@ -0,0 +1,215 @@ +{ + "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": "Literal", + "start": 12, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": 14, + "rawValue": 14, + "raw": "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": "Literal", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": 3, + "rawValue": 3, + "raw": "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": "Literal", + "start": 27, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": 1977, + "rawValue": 1977, + "raw": "1977" + } + } + ], + "kind": "const" + } + ] + } + ] + } +} \ 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/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..546a1c4026 --- /dev/null +++ b/test/fixtures/esprima/declaration-function/empty-param/expected.json @@ -0,0 +1,150 @@ +{ + "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": [ + { + "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/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..246b6b5a20 --- /dev/null +++ b/test/fixtures/esprima/declaration-function/migrated_0004/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": "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": [] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..c1db4cf35a --- /dev/null +++ b/test/fixtures/esprima/declaration-function/migrated_0005/expected.json @@ -0,0 +1,168 @@ +{ + "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": [ + { + "type": "ExpressionStatement", + "start": 37, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "expression": { + "type": "Literal", + "start": 37, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "value": "use strict", + "rawValue": "use strict", + "raw": "\"use strict\"" + } + } + ] + } + } + ] + } + } + ] + } +} \ 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..4841a07e51 --- /dev/null +++ b/test/fixtures/esprima/declaration-function/migrated_0012/expected.json @@ -0,0 +1,84 @@ +{ + "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": [] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..72f253f625 --- /dev/null +++ b/test/fixtures/esprima/declaration-function/migrated_0014/expected.json @@ -0,0 +1,151 @@ +{ + "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": "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\"" + }, + "operator": "+", + "right": { + "type": "Literal", + "start": 33, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } + } + ] + } +} \ 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..421e69547d --- /dev/null +++ b/test/fixtures/esprima/declaration-let/migrated_0002/expected.json @@ -0,0 +1,117 @@ +{ + "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": "Literal", + "start": 10, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ], + "kind": "let" + } + ] + } + ] + } +} \ 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..1614fceb4c --- /dev/null +++ b/test/fixtures/esprima/declaration-let/migrated_0003/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": "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": "Literal", + "start": 10, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": 14, + "rawValue": 14, + "raw": "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": "Literal", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "value": 3, + "rawValue": 3, + "raw": "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": "Literal", + "start": 25, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": 1977, + "rawValue": 1977, + "raw": "1977" + } + } + ], + "kind": "let" + } + ] + } + ] + } +} \ 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..6fc51fdb6d --- /dev/null +++ b/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json @@ -0,0 +1,180 @@ +{ + "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": "ExpressionStatement", + "start": 15, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "Literal", + "start": 15, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": "use strict", + "rawValue": "use strict", + "raw": "'use\\x20strict'" + } + }, + { + "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 + } + } + } + } + ] + } + }, + "arguments": [], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..97967a7597 --- /dev/null +++ b/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json @@ -0,0 +1,180 @@ +{ + "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": "ExpressionStatement", + "start": 15, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "expression": { + "type": "Literal", + "start": 15, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": "use\nstrict", + "rawValue": "use\nstrict", + "raw": "'use\\nstrict'" + } + }, + { + "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 + } + } + } + } + ] + } + }, + "arguments": [], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..aac755fdd7 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-01/expected.json @@ -0,0 +1,136 @@ +{ + "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": "Literal", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + } + } + ] + } +} \ 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..acb3c68692 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-02/expected.json @@ -0,0 +1,135 @@ +{ + "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": "Literal", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..bb4d92fc83 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-03/expected.json @@ -0,0 +1,150 @@ +{ + "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": "Literal", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..055970fd64 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-binding-pattern/array-binding-pattern-empty/expected.json @@ -0,0 +1,102 @@ +{ + "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": "Literal", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..7c9c32e1c5 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-binding-pattern/elision/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": "ArrayPattern", + "start": 1, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "elements": [ + null, + null + ] + } + ], + "body": { + "type": "Literal", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "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/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-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-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-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-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/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..f0c82eec3f --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/elision/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": "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": "Literal", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "let" + } + ] + } +} \ 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..536a85d158 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json @@ -0,0 +1,100 @@ +{ + "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": "Literal", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..44ee381630 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/hole/expected.json @@ -0,0 +1,134 @@ +{ + "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": "Literal", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "let" + } + ] + } +} \ 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..5d80c8dd9c --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json @@ -0,0 +1,117 @@ +{ + "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": "Literal", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "let" + } + ] + } +} \ 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..aca079ee39 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:20)" +} \ No newline at end of file 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..0a028a82f1 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json @@ -0,0 +1,464 @@ +{ + "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": [] + }, + "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": "Property", + "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" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "name": "c" + } + }, + { + "type": "Property", + "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": "Literal", + "start": 28, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "kind": "init" + }, + { + "type": "Property", + "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": "Literal", + "start": 37, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "kind": "init" + }, + { + "type": "Property", + "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" + }, + "kind": "init", + "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": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } +} \ 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..7118bc2683 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/rest/expected.json @@ -0,0 +1,132 @@ +{ + "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": "Literal", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "let" + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-array-pattern/rest/options.json b/test/fixtures/esprima/es2015-array-pattern/rest/options.json new file mode 100644 index 0000000000..328b1ddde8 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/rest/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:10)" +} \ 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..695be41271 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json @@ -0,0 +1,118 @@ +{ + "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": "Literal", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "let" + } + ] + } +} \ 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..b45bc367e9 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json @@ -0,0 +1,163 @@ +{ + "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": [] + }, + "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": "Literal", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ] + }, + "body": { + "type": "BlockStatement", + "start": 24, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "body": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } +} \ 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..da1c0b9799 --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json @@ -0,0 +1,150 @@ +{ + "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": "Literal", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ] + } + ], + "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-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..d7d0077c3d --- /dev/null +++ b/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json @@ -0,0 +1,169 @@ +{ + "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": "Property", + "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" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "name": "a" + } + } + ] + } + ] + }, + "init": { + "type": "Literal", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "let" + } + ] + } +} \ 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..878f8d67a9 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json @@ -0,0 +1,149 @@ +{ + "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": "Literal", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..7528bfa144 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json @@ -0,0 +1,117 @@ +{ + "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": "Literal", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..4ebe77e8fc --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Argument name clash in strict mode (1:7)" +} 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..cdf259a636 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json @@ -0,0 +1,85 @@ +{ + "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": "Literal", + "start": 6, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + } + } + ] + } +} \ 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..fd76eb8af9 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json @@ -0,0 +1,102 @@ +{ + "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": "Literal", + "start": 5, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + } + } + ] + } +} \ 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..1b9cab7e5c --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/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": "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": "Literal", + "start": 7, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + } + } + ] + } +} \ 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..5a88aff7cb --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json @@ -0,0 +1,118 @@ +{ + "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": "Literal", + "start": 10, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + } + } + ] + } +} \ 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..a8c79cf5fc --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json @@ -0,0 +1,134 @@ +{ + "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": "Literal", + "start": 7, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ] + } + } + } + ] + } +} \ 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..616b8e8a5b --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json @@ -0,0 +1,155 @@ +{ + "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": "Property", + "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": "Literal", + "start": 18, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + }, + "kind": "init" + } + ], + "parenthesizedExpression": true + } + } + } + ] + } +} \ 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..be00941649 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json @@ -0,0 +1,165 @@ +{ + "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": "Literal", + "start": 14, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + }, + "label": { + "type": "Identifier", + "start": 7, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "name": "label" + } + } + ] + } + } + } + ] + } +} \ 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..f79a8f0276 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json @@ -0,0 +1,150 @@ +{ + "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": "Literal", + "start": 12, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ] + } + } + } + ] + } +} \ 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..7ad095e070 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json @@ -0,0 +1,165 @@ +{ + "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": "Literal", + "start": 3, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "value": 1, + "rawValue": 1, + "raw": "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" + } + } + } + } + ] + } +} \ 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..c45a0f326b --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json @@ -0,0 +1,102 @@ +{ + "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": "Literal", + "start": 8, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..6af42ac3f5 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json @@ -0,0 +1,102 @@ +{ + "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": "Literal", + "start": 13, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..79998f9b16 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json @@ -0,0 +1,102 @@ +{ + "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": "Literal", + "start": 7, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "value": 0, + "rawValue": 0, + "raw": "00" + } + } + } + ] + } +} \ 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..09c80c6f1e --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json @@ -0,0 +1,118 @@ +{ + "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": "Literal", + "start": 13, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..7549259432 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/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": "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": "Literal", + "start": 8, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + ], + "body": { + "type": "Literal", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..6ea224db79 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json @@ -0,0 +1,151 @@ +{ + "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": "Literal", + "start": 11, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + ], + "body": { + "type": "Literal", + "start": 18, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..e81c37fc89 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0015/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": "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" + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..8a76cf1c16 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/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": 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": "Literal", + "start": 10, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + } + ] + } +} \ 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..8a2ef02d21 --- /dev/null +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json @@ -0,0 +1,203 @@ +{ + "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" + } + ], + "parenthesizedExpression": true + }, + "parenthesizedExpression": true + } + } + } + ] + } +} \ 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..d75e50e145 --- /dev/null +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0b0" + } + } + ] + } +} \ 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..87c4066eaf --- /dev/null +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + }, + "value": 1, + "rawValue": 1, + "raw": "0b1" + } + } + ] + } +} \ 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..15344e54fd --- /dev/null +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "value": 2, + "rawValue": 2, + "raw": "0b10" + } + } + ] + } +} \ 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..25eeb9786f --- /dev/null +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0B0" + } + } + ] + } +} \ 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..d42f8407c2 --- /dev/null +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + }, + "value": 1, + "rawValue": 1, + "raw": "0B1" + } + } + ] + } +} \ 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..6f8f49f4e1 --- /dev/null +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "value": 2, + "rawValue": 2, + "raw": "0B10" + } + } + ] + } +} \ 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..99cd27794e --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0001/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + }, + "body": { + "type": "ClassBody", + "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-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..e60d7294c3 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0004/expected.json @@ -0,0 +1,151 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..4ead53f755 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0005/expected.json @@ -0,0 +1,220 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "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": [] + } + } + }, + { + "type": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..a4bb492dbb --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0006/expected.json @@ -0,0 +1,220 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "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": [] + } + } + }, + { + "type": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 16, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..77aa858ee4 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0007/expected.json @@ -0,0 +1,220 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "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": [] + } + } + }, + { + "type": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 16, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..f0da7ec99b --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0008/expected.json @@ -0,0 +1,220 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "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": [] + } + } + }, + { + "type": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 17, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..0cd6f1a23f --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0009/expected.json @@ -0,0 +1,151 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..b2101dd75c --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0010/expected.json @@ -0,0 +1,237 @@ +{ + "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": "MethodDefinition", + "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", + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 24, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..1c0665ae72 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0011/expected.json @@ -0,0 +1,306 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 17, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "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": [] + } + } + }, + { + "type": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 34, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "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": [] + } + } + }, + { + "type": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 51, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 51 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..b1acc4da5f --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0012/expected.json @@ -0,0 +1,151 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 17, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..a366c8ad3f --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0013/expected.json @@ -0,0 +1,151 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 19, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..b9887ebdf9 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0014/expected.json @@ -0,0 +1,220 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "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": [] + } + } + }, + { + "type": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..7e151a458e --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0015/expected.json @@ -0,0 +1,151 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 22, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..150f14ca4c --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0016/expected.json @@ -0,0 +1,147 @@ +{ + "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": "Literal", + "start": 24, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + }, + "body": { + "type": "ClassBody", + "start": 25, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "body": [] + } + } + } + ], + "kind": "var" + } + ] + } +} \ 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..a887878c99 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0017/expected.json @@ -0,0 +1,151 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..4ce9a1e28c --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0018/expected.json @@ -0,0 +1,151 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 20, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..8b28390427 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json @@ -0,0 +1,224 @@ +{ + "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": "MethodDefinition", + "start": 9, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "computed": false, + "key": { + "type": "Literal", + "start": 9, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": "constructor", + "rawValue": "constructor", + "raw": "\"constructor\"" + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 22, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "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": [] + } + } + }, + { + "type": "MethodDefinition", + "start": 27, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "computed": true, + "key": { + "type": "Literal", + "start": 28, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "value": "constructor", + "rawValue": "constructor", + "raw": "\"constructor\"" + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 42, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..0241df155f --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0020/expected.json @@ -0,0 +1,220 @@ +{ + "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": "MethodDefinition", + "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", + "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": [] + } + } + }, + { + "type": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 50, + "end": 54, + "loc": { + "start": { + "line": 1, + "column": 50 + }, + "end": { + "line": 1, + "column": 54 + } + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..0d65fe2441 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json @@ -0,0 +1,153 @@ +{ + "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": "MethodDefinition", + "start": 9, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "computed": true, + "key": { + "type": "Literal", + "start": 17, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": "prototype", + "rawValue": "prototype", + "raw": "\"prototype\"" + }, + "static": true, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 29, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..5a08887ae2 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0022/expected.json @@ -0,0 +1,82 @@ +{ + "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": [] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..daf97fa8cc --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0023/expected.json @@ -0,0 +1,97 @@ +{ + "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": [] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..897b90b1c4 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0024/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": 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": "Literal", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + }, + "body": { + "type": "ClassBody", + "start": 16, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "body": [] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..80a74cd675 --- /dev/null +++ b/test/fixtures/esprima/es2015-class/migrated_0025/expected.json @@ -0,0 +1,114 @@ +{ + "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": "Literal", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + }, + "body": { + "type": "ClassBody", + "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-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..7354aa5050 --- /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": "MethodDefinition", + "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-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..8b22c0b26b --- /dev/null +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json @@ -0,0 +1,165 @@ +{ + "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": "Literal", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ], + "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-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..8cbbeeddbb --- /dev/null +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json @@ -0,0 +1,133 @@ +{ + "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": "Literal", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ], + "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-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..4f349927b9 --- /dev/null +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json @@ -0,0 +1,217 @@ +{ + "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": "Property", + "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": "Literal", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 23, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "body": [] + } + }, + "kind": "init" + } + ] + } + } + } + ] + } +} \ 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..574f634dc3 --- /dev/null +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/dup-assignment/expected.json @@ -0,0 +1,163 @@ +{ + "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": "Literal", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..e56c4d8f57 --- /dev/null +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/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": "ArrayPattern", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "elements": [ + null, + null + ] + }, + "right": { + "type": "Literal", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..80579906b4 --- /dev/null +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/member-expr-in-rest/expected.json @@ -0,0 +1,164 @@ +{ + "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": "Literal", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + }, + "computed": true + } + } + ] + }, + "right": { + "type": "Literal", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..b274610e61 --- /dev/null +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json @@ -0,0 +1,293 @@ +{ + "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": "Literal", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "value": 0, + "rawValue": 0, + "raw": "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": "Literal", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + }, + "computed": true + } + } + ] + }, + "right": { + "type": "ObjectExpression", + "start": 19, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "properties": [] + } + } + ] + }, + "right": { + "type": "Literal", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..335b17c62c --- /dev/null +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-cover-grammar/expected.json @@ -0,0 +1,198 @@ +{ + "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": "Property", + "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" + }, + "kind": "init", + "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": "Literal", + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ] + } + } + ] + } +} \ 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..04a63a3079 --- /dev/null +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json @@ -0,0 +1,115 @@ +{ + "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": "Literal", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..71ff2e0702 --- /dev/null +++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/empty-object-pattern-assignment/expected.json @@ -0,0 +1,99 @@ +{ + "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": "Literal", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..65409260c0 --- /dev/null +++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/nested-cover-grammar/expected.json @@ -0,0 +1,555 @@ +{ + "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": "Property", + "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" + }, + "kind": "init", + "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": "Literal", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + }, + "computed": true + } + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "right": { + "type": "Literal", + "start": 49, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 49 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..1689a3fe18 --- /dev/null +++ b/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/object-pattern-assignment/expected.json @@ -0,0 +1,568 @@ +{ + "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": "Property", + "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" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + }, + "name": "a" + } + }, + { + "type": "Property", + "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" + }, + "kind": "init" + }, + { + "type": "Property", + "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" + } + }, + "kind": "init" + }, + { + "type": "Property", + "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": "Property", + "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" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 39, + "end": 40, + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + }, + "name": "a" + } + } + ] + }, + "kind": "init" + }, + { + "type": "Property", + "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 + }, + "kind": "init" + }, + { + "type": "Property", + "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 + }, + "kind": "init" + } + ] + }, + "right": { + "type": "Literal", + "start": 82, + "end": 83, + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 5 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..3291034455 --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json @@ -0,0 +1,117 @@ +{ + "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": "Literal", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ], + "kind": "const" + } + } + ] + } +} \ 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..0d4410ae2e --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json @@ -0,0 +1,81 @@ +{ + "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": "ClassExpression", + "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": [] + } + } + } + ] + } +} \ 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..81384a8a1d --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json @@ -0,0 +1,101 @@ +{ + "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": "Literal", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "operator": "+", + "right": { + "type": "Literal", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": 2, + "rawValue": 2, + "raw": "2" + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..be8795503e --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json @@ -0,0 +1,83 @@ +{ + "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": "FunctionExpression", + "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": [] + } + } + } + ] + } +} \ 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..b0579df273 --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ] + } +} \ 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..3881690753 --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json @@ -0,0 +1,118 @@ +{ + "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": "Property", + "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": "Literal", + "start": 22, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "kind": "init" + } + ] + } + } + ] + } +} \ 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..c23e216897 --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 14, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..9b94e4de83 --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json @@ -0,0 +1,116 @@ +{ + "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": "Literal", + "start": 22, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..1f80e99f3b --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json @@ -0,0 +1,116 @@ +{ + "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": "Literal", + "start": 29, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..263e8769d4 --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json @@ -0,0 +1,116 @@ +{ + "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": "Literal", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..39ad36c9ac --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json @@ -0,0 +1,163 @@ +{ + "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": "Literal", + "start": 34, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..37e27ba6b1 --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json @@ -0,0 +1,116 @@ +{ + "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": "Literal", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..90f8b953b5 --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json @@ -0,0 +1,163 @@ +{ + "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": "Literal", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..a3474dbd50 --- /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": [] + } + } + }, + { + "type": "ExpressionStatement", + "start": 26, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "Literal", + "start": 26, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + } + ] + } +} \ 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..63b6fdfeec --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json @@ -0,0 +1,117 @@ +{ + "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": "Literal", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ], + "kind": "let" + } + } + ] + } +} \ 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..af2ce633cb --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json @@ -0,0 +1,117 @@ +{ + "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": "Literal", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ], + "kind": "var" + } + } + ] + } +} \ 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/esprima/es2015-export-declaration/options.json b/test/fixtures/esprima/es2015-export-declaration/options.json new file mode 100644 index 0000000000..2104ca4328 --- /dev/null +++ b/test/fixtures/esprima/es2015-export-declaration/options.json @@ -0,0 +1,3 @@ +{ + "sourceType": "module" +} 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..2fcb51b5b1 --- /dev/null +++ b/test/fixtures/esprima/es2015-for-of/for-of-object-pattern-const/expected.json @@ -0,0 +1,232 @@ +{ + "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": "Property", + "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" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "name": "x" + } + }, + { + "type": "Property", + "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" + }, + "kind": "init", + "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 + } + } + } + } + ] + } +} \ 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..9cfd59a3ab --- /dev/null +++ b/test/fixtures/esprima/es2015-for-of/for-of-object-pattern/expected.json @@ -0,0 +1,198 @@ +{ + "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": "Property", + "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" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "name": "x" + } + }, + { + "type": "Property", + "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" + }, + "kind": "init", + "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 + } + } + } + } + ] + } +} \ 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..89e36d9013 --- /dev/null +++ b/test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:16)" +} \ No newline at end of file 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-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..ed91c27238 --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield-delegate/expected.json @@ -0,0 +1,133 @@ +{ + "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": "Literal", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "value": 3, + "rawValue": 3, + "raw": "3" + } + } + } + ] + } + } + ] + } +} \ 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..1e6854a12e --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json @@ -0,0 +1,133 @@ +{ + "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": "Literal", + "start": 24, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "value": 3, + "rawValue": 3, + "raw": "3" + } + } + } + ] + } + } + ] + } +} \ 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..cc24e31b58 --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json @@ -0,0 +1,116 @@ +{ + "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": [] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..0f53a4fd9c --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json @@ -0,0 +1,133 @@ +{ + "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": [] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..4b28752a8f --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield-delegate/expected.json @@ -0,0 +1,181 @@ +{ + "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" + } + } + } + ] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..aada6e0350 --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json @@ -0,0 +1,134 @@ +{ + "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": "Literal", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": 3, + "rawValue": 3, + "raw": "3" + } + } + } + ] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..ab58afaeee --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-expression/expected.json @@ -0,0 +1,84 @@ +{ + "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": [] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..d54bbc11a2 --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json @@ -0,0 +1,185 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 7, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..86f538137e --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-delegate/expected.json @@ -0,0 +1,186 @@ +{ + "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": 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": "init", + "value": { + "type": "FunctionExpression", + "start": 7, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "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": "Literal", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": 3, + "rawValue": 3, + "raw": "3" + } + } + } + ] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..652e20d1b3 --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-expression/expected.json @@ -0,0 +1,186 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 7, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "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": "Literal", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "value": 3, + "rawValue": 3, + "raw": "3" + } + } + } + ] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..4fc6768637 --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield-line-terminator/expected.json @@ -0,0 +1,202 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 7, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "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": "Literal", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 + } + }, + "value": 3, + "rawValue": 3, + "raw": "3" + } + } + ] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..dd439657fc --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json @@ -0,0 +1,169 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 7, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "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 + } + } + ] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..ce2bcad3ea --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/generator-method/expected.json @@ -0,0 +1,136 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 7, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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-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/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-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..d257165465 --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/static-generator-method-with-computed-name/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": "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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..bebbec9f26 --- /dev/null +++ b/test/fixtures/esprima/es2015-generator/static-generator-method/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": 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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "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": [] + } + } + } + ] + } + } + ] + } +} \ 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_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_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_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/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..9ceb584ddd --- /dev/null +++ b/test/fixtures/esprima/es2015-identifier/module_await/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ] + } +} \ 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..480b8d531d --- /dev/null +++ b/test/fixtures/esprima/es2015-identifier/valid_await/expected.json @@ -0,0 +1,115 @@ +{ + "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", + "parenthesizedExpression": true + } + } + ] + } +} \ 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..edc235cd14 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-default-and-named-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": "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": "Literal", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..f4121da033 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json @@ -0,0 +1,130 @@ +{ + "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": "Literal", + "start": 26, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..ef53af8608 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json @@ -0,0 +1,115 @@ +{ + "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": "Literal", + "start": 29, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..f65d947db8 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-default/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": "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": "Literal", + "start": 16, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..5466ba5614 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-jquery/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": "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": "Literal", + "start": 14, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": "jquery", + "rawValue": "jquery", + "raw": "\"jquery\"" + } + } + ] + } +} \ 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..bb56815106 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json @@ -0,0 +1,67 @@ +{ + "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": "Literal", + "start": 7, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..58842b0c0d --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json @@ -0,0 +1,115 @@ +{ + "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": "Literal", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..b063a99cd2 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json @@ -0,0 +1,162 @@ +{ + "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": "Literal", + "start": 30, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..a896b50ab1 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json @@ -0,0 +1,67 @@ +{ + "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": "Literal", + "start": 15, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..6a3be9f6d3 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json @@ -0,0 +1,115 @@ +{ + "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": "Literal", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..2913832639 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json @@ -0,0 +1,162 @@ +{ + "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": "Literal", + "start": 24, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..f5152845f5 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/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": "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": "Literal", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..27b3e13863 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json @@ -0,0 +1,99 @@ +{ + "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": "Literal", + "start": 21, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "value": "foo", + "rawValue": "foo", + "raw": "\"foo\"" + } + } + ] + } +} \ 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..20286c5ce1 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json @@ -0,0 +1,115 @@ +{ + "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": "Literal", + "start": 28, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "value": "bar", + "rawValue": "bar", + "raw": "\"bar\"" + } + } + ] + } +} \ 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/esprima/es2015-import-declaration/options.json b/test/fixtures/esprima/es2015-import-declaration/options.json new file mode 100644 index 0000000000..2104ca4328 --- /dev/null +++ b/test/fixtures/esprima/es2015-import-declaration/options.json @@ -0,0 +1,3 @@ +{ + "sourceType": "module" +} 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..9cb6015642 --- /dev/null +++ b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json @@ -0,0 +1,184 @@ +{ + "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": "Literal", + "start": 35, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ], + "kind": "let" + }, + { + "type": "BreakStatement", + "start": 39, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "label": null + } + ], + "test": { + "type": "Literal", + "start": 23, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ] + } + ] + } +} \ 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/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/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..5d4235ff90 --- /dev/null +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0000/expected.json @@ -0,0 +1,167 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 12, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "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": [] + } + } + } + ] + } + } + } + ] + } +} \ 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..9e72a8c644 --- /dev/null +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0001/expected.json @@ -0,0 +1,184 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 12, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "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": [] + } + } + } + ] + } + } + } + ] + } +} \ 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..c05da73d96 --- /dev/null +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0002/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": "ObjectExpression", + "start": 4, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "properties": [ + { + "type": "Property", + "start": 6, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "method": true, + "shorthand": false, + "computed": false, + "key": { + "type": "Literal", + "start": 6, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": "method", + "rawValue": "method", + "raw": "'method'" + }, + "kind": "init", + "value": { + "type": "FunctionExpression", + "start": 14, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "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": [] + } + } + } + ] + } + } + } + ] + } +} \ 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..986432a828 --- /dev/null +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0003/expected.json @@ -0,0 +1,167 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 9, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "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": [] + } + } + } + ] + } + } + } + ] + } +} \ 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..8d18a3447c --- /dev/null +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0004/expected.json @@ -0,0 +1,167 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 9, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "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": [] + } + } + } + ] + } + } + } + ] + } +} \ 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/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/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..7b7329bb7e --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:30)" +} \ No newline at end of file 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/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/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..cbc444ce90 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:32)" +} \ No newline at end of file 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/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/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..0c5f4deed6 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:24)" +} \ No newline at end of file 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..00b62a33f8 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:26)" +} \ No newline at end of file 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..0c5f4deed6 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:24)" +} \ No newline at end of file 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..226684195f --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json @@ -0,0 +1,276 @@ +{ + "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": "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": 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", + "value": { + "type": "FunctionExpression", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "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": [] + } + } + }, + { + "type": "Property", + "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", + "value": { + "type": "FunctionExpression", + "start": 52, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 52 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..799d51e116 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json @@ -0,0 +1,189 @@ +{ + "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": "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": 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", + "value": { + "type": "FunctionExpression", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..12192e3584 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json @@ -0,0 +1,189 @@ +{ + "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": "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": 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": "init", + "value": { + "type": "FunctionExpression", + "start": 29, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..b85b34999c --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json @@ -0,0 +1,206 @@ +{ + "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": "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": 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", + "value": { + "type": "FunctionExpression", + "start": 33, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..fb52590573 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter-setter/expected.json @@ -0,0 +1,278 @@ +{ + "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": "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": 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", + "value": { + "type": "FunctionExpression", + "start": 35, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "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": [] + } + } + }, + { + "type": "Property", + "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", + "value": { + "type": "FunctionExpression", + "start": 54, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..981e9ca6a1 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json @@ -0,0 +1,191 @@ +{ + "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": "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": 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", + "value": { + "type": "FunctionExpression", + "start": 35, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..aaff700170 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json @@ -0,0 +1,191 @@ +{ + "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": "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": 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": "init", + "value": { + "type": "FunctionExpression", + "start": 31, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..92e920ccdd --- /dev/null +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json @@ -0,0 +1,208 @@ +{ + "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": "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": 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", + "value": { + "type": "FunctionExpression", + "start": 35, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..83f868da39 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-literal-property-value-shorthand/migrated_0000/expected.json @@ -0,0 +1,199 @@ +{ + "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": "Property", + "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" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "name": "y" + } + }, + { + "type": "Property", + "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" + }, + "kind": "init", + "value": { + "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/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..7b239f85db --- /dev/null +++ b/test/fixtures/esprima/es2015-object-pattern/elision/expected.json @@ -0,0 +1,152 @@ +{ + "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": "Property", + "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" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "name": "a" + } + } + ] + }, + "init": { + "type": "Literal", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "let" + } + ] + } +} \ 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..d3ba43788a --- /dev/null +++ b/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json @@ -0,0 +1,131 @@ +{ + "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": "Literal", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + }, + "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-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..dbbd5e0895 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json @@ -0,0 +1,100 @@ +{ + "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": "Literal", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "let" + } + ] + } +} \ 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..24ff27c2f1 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json @@ -0,0 +1,100 @@ +{ + "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": "Literal", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..1e70efa276 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-pattern/nested/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": "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": "Property", + "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": [] + }, + "kind": "init" + } + ] + }, + "init": { + "type": "Literal", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "let" + } + ] + } +} \ 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..3540998633 --- /dev/null +++ b/test/fixtures/esprima/es2015-object-pattern/properties/expected.json @@ -0,0 +1,439 @@ +{ + "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": "Property", + "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" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "name": "a" + } + }, + { + "type": "Property", + "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" + }, + "kind": "init", + "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": "Literal", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + }, + { + "type": "Property", + "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" + }, + "kind": "init" + }, + { + "type": "Property", + "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": "Literal", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "kind": "init" + }, + { + "type": "Property", + "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" + } + ] + }, + "kind": "init" + } + ] + }, + "init": { + "type": "Literal", + "start": 30, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "let" + } + ] + } +} \ 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..7071e2971b --- /dev/null +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 2, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + }, + "value": 0, + "rawValue": 0, + "raw": "00" + } + } + ] + } +} \ 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..198d34971a --- /dev/null +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0o0" + } + } + ] + } +} \ 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..205a96ab16 --- /dev/null +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/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": 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": 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, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "expression": { + "type": "Literal", + "start": 31, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0o0" + } + } + ] + } + } + ] + } +} \ 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..5e0a93482f --- /dev/null +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + }, + "value": 2, + "rawValue": 2, + "raw": "0o2" + } + } + ] + } +} \ 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..99d27ef22c --- /dev/null +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "value": 10, + "rawValue": 10, + "raw": "0o12" + } + } + ] + } +} \ 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..b97a7679b0 --- /dev/null +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json @@ -0,0 +1,66 @@ +{ + "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": "Literal", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0O0" + } + } + ] + } +} \ 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..e3ee2c9f37 --- /dev/null +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/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": 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": 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, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "expression": { + "type": "Literal", + "start": 31, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0O0" + } + } + ] + } + } + ] + } +} \ 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..e7736168c6 --- /dev/null +++ b/test/fixtures/esprima/es2015-rest-parameter/object-method/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": "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": "Property", + "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": [] + } + }, + "kind": "init" + } + ] + } + } + } + ] + } +} \ 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..aee5d3439b --- /dev/null +++ b/test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/expected.json @@ -0,0 +1,199 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 12, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "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": [] + } + } + } + ] + } + } + } + ] + } +} \ 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/esprima/es2015-spread-element/call-multi-spread/expected.json b/test/fixtures/esprima/es2015-spread-element/call-multi-spread/expected.json new file mode 100644 index 0000000000..2610b26d4f --- /dev/null +++ b/test/fixtures/esprima/es2015-spread-element/call-multi-spread/expected.json @@ -0,0 +1,174 @@ +{ + "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": "CallExpression", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "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": "SpreadElement", + "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": "y" + } + }, + { + "type": "SpreadElement", + "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": "z" + } + } + ] + } + } + ] + } +} \ 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..0b852348e3 --- /dev/null +++ b/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json @@ -0,0 +1,114 @@ +{ + "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": "Literal", + "start": 5, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 0.5, + "rawValue": 0.5, + "raw": ".5" + } + } + ] + } + } + ] + } +} \ 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/esprima/es2015-spread-element/new-multi-spread/expected.json b/test/fixtures/esprima/es2015-spread-element/new-multi-spread/expected.json new file mode 100644 index 0000000000..8a3987d6e0 --- /dev/null +++ b/test/fixtures/esprima/es2015-spread-element/new-multi-spread/expected.json @@ -0,0 +1,174 @@ +{ + "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": "NewExpression", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "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": "SpreadElement", + "start": 12, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "argument": { + "type": "Identifier", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "name": "y" + } + }, + { + "type": "SpreadElement", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "argument": { + "type": "Identifier", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "name": "z" + } + } + ] + } + } + ] + } +} \ 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..f0ce7bb220 --- /dev/null +++ b/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json @@ -0,0 +1,114 @@ +{ + "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": "Literal", + "start": 9, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": 0.5, + "rawValue": 0.5, + "raw": ".5" + } + } + ] + } + } + ] + } +} \ 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/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..b94e426219 --- /dev/null +++ b/test/fixtures/esprima/es2015-super-property/arrow_super/expected.json @@ -0,0 +1,232 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 35, + "end": 67, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "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": [] + } + } + } + ] + } + } + } + ] + } + } + ] + } +} \ 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..dd99c7bb8e --- /dev/null +++ b/test/fixtures/esprima/es2015-super-property/constructor_super/expected.json @@ -0,0 +1,213 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 35, + "end": 62, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "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": [] + } + } + ] + } + } + } + ] + } + } + ] + } +} \ 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..18fe6d12a8 --- /dev/null +++ b/test/fixtures/esprima/es2015-super-property/invalid_super_access/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected super (3:9)" +} 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..9f101bba08 --- /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": "MethodDefinition", + "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/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..d86a834f70 --- /dev/null +++ b/test/fixtures/esprima/es2015-super-property/new_super/expected.json @@ -0,0 +1,245 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 27, + "end": 61, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "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": [] + } + } + ] + } + } + } + ] + } + } + ] + } +} \ 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..ff1ee7f02a --- /dev/null +++ b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json @@ -0,0 +1,231 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 25, + "end": 59, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "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": "Literal", + "start": 51, + "end": 52, + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "computed": true + } + } + ] + } + } + } + ] + } + } + ] + } +} \ 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..ad4ef9c6c4 --- /dev/null +++ b/test/fixtures/esprima/es2015-super-property/super_member/expected.json @@ -0,0 +1,229 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 25, + "end": 58, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "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 + } + } + ] + } + } + } + ] + } + } + ] + } +} \ 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..0dade7f955 --- /dev/null +++ b/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json @@ -0,0 +1,100 @@ +{ + "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": "Literal", + "start": 13, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "value": "`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`", + "rawValue": "`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`", + "raw": "'`\\\\n\\\\r\\\\b\\\\v\\\\t\\\\f\\\\\\n\\\\\\r\\n`'" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..a2c5419a32 --- /dev/null +++ b/test/fixtures/esprima/es2015-template-literals/line-terminators/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": "`\n\r\n`", + "rawValue": "`\n\r\n`", + "raw": "'`\\n\\r\\n`'" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..aa36f4ccae --- /dev/null +++ b/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json @@ -0,0 +1,100 @@ +{ + "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": "Literal", + "start": 13, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 50 + } + }, + "value": "`\\u{000042}\\u0042\\x42\\u0\\A\\0`", + "rawValue": "`\\u{000042}\\u0042\\x42\\u0\\A\\0`", + "raw": "'`\\\\u{000042}\\\\u0042\\\\x42\\\\u0\\\\A\\\\0`'" + } + } + ], + "kind": "var" + } + ] + } +} \ 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/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/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..8572ac41d4 --- /dev/null +++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json @@ -0,0 +1,100 @@ +{ + "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": "Literal", + "start": 13, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "value": "\"\\u{714E}\\u{8336}\"", + "rawValue": "\"\\u{714E}\\u{8336}\"", + "raw": "'\"\\\\u{714E}\\\\u{8336}\"'" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..0192886854 --- /dev/null +++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json @@ -0,0 +1,100 @@ +{ + "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": "Literal", + "start": 13, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "value": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"", + "rawValue": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"", + "raw": "'\"\\\\u{20BB7}\\\\u{91CE}\\\\u{5BB6}\"'" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..965abbf51a --- /dev/null +++ b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json @@ -0,0 +1,100 @@ +{ + "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": "Literal", + "start": 13, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "value": "\"\\u{00000000034}\"", + "rawValue": "\"\\u{00000000034}\"", + "raw": "'\"\\\\u{00000000034}\"'" + } + } + ], + "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-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-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-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-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-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-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-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/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/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/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/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/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/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/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/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/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/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..5a8f717350 --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json @@ -0,0 +1,114 @@ +{ + "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" + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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/esprima/es2015-yield/yield-arrow-parameter-default/expected.json b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-default/expected.json new file mode 100644 index 0000000000..2058074918 --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-default/expected.json @@ -0,0 +1,131 @@ +{ + "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": "AssignmentPattern", + "start": 1, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "left": { + "type": "Identifier", + "start": 1, + "end": 2, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + }, + "name": "x" + }, + "right": { + "type": "Identifier", + "start": 5, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "yield" + } + } + ], + "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-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..4fdb12deff --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json @@ -0,0 +1,102 @@ +{ + "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": "Literal", + "start": 11, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..350b3f3ac2 --- /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": "Property", + "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" + }, + "kind": "init" + } + ] + }, + "init": { + "type": "Identifier", + "start": 19, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "name": "foo" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..65944e5be1 --- /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": "Property", + "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" + }, + "kind": "init" + } + ] + }, + "init": { + "type": "Identifier", + "start": 19, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "name": "foo" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..be34ece5b3 --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/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": "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": [] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..03c3926cb0 --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-function-expression/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": false, + "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/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-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-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/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..9260f06278 --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json @@ -0,0 +1,136 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..f491ff04fd --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-generator-parameter-object-pattern/expected.json @@ -0,0 +1,152 @@ +{ + "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": "Property", + "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" + }, + "kind": "init" + } + ] + } + ], + "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-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..dec93c479a --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/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": "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": "Literal", + "start": 12, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..7a4f9cbf39 --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-method/expected.json @@ -0,0 +1,136 @@ +{ + "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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 8, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..68bee782bd --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/expected.json @@ -0,0 +1,152 @@ +{ + "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": "Property", + "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" + }, + "kind": "init" + } + ] + } + ], + "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-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..cff6332edb --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json @@ -0,0 +1,183 @@ +{ + "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": 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": "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": 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" + }, + "kind": "init" + } + ] + }, + "init": { + "type": "Identifier", + "start": 33, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": "foo" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..73ba30aca8 --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json @@ -0,0 +1,169 @@ +{ + "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": 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": 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": "Property", + "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": "init", + "value": { + "type": "FunctionExpression", + "start": 22, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "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": [] + } + } + } + ], + "parenthesizedExpression": true + } + } + ] + } +} \ 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..4e179ca792 --- /dev/null +++ b/test/fixtures/esprima/es2015-yield/yield-super-property/expected.json @@ -0,0 +1,229 @@ +{ + "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": "MethodDefinition", + "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", + "value": { + "type": "FunctionExpression", + "start": 21, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "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 + } + } + ] + } + } + } + ] + } + } + ] + } +} \ 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..d3ad9d674b --- /dev/null +++ b/test/fixtures/esprima/expression-additive/migrated_0002/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": "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": "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\"" + }, + "operator": "+", + "right": { + "type": "Literal", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..dcfe85d992 --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 4, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..32e9683fad --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 7, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..aadc603158 --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 12, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..c68b13b4a8 --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 5, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..2a2e320c76 --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 5, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..f61cd91960 --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 5, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..d87bd7221e --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 5, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..58ac4f76d5 --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 5, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..6aec1fd6ae --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 6, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..2afa7f1ab0 --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 6, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..34ae7fde25 --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 7, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..a97d4cb79e --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 5, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..7a092cae1b --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 5, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..0c297787a4 --- /dev/null +++ b/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json @@ -0,0 +1,98 @@ +{ + "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": "Literal", + "start": 5, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..355a73a1ad --- /dev/null +++ b/test/fixtures/esprima/expression-conditional/migrated_0000/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": "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": "Literal", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "Literal", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "value": 2, + "rawValue": 2, + "raw": "2" + } + } + } + ] + } +} \ 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..618615ef5f --- /dev/null +++ b/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json @@ -0,0 +1,147 @@ +{ + "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": "Literal", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "Literal", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": 2, + "rawValue": 2, + "raw": "2" + } + } + } + ] + } +} \ 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..3875482cdf --- /dev/null +++ b/test/fixtures/esprima/expression-conditional/migrated_0002/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": "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": "Literal", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0", + "parenthesizedExpression": true + }, + "consequent": { + "type": "Literal", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "Literal", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": 2, + "rawValue": 2, + "raw": "2" + } + } + } + } + ] + } +} \ 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..68090be774 --- /dev/null +++ b/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json @@ -0,0 +1,136 @@ +{ + "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": "Literal", + "start": 1, + "end": 2, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1", + "parenthesizedExpression": true + }, + "operator": "+", + "right": { + "type": "Literal", + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "value": 2, + "rawValue": 2, + "raw": "2", + "parenthesizedExpression": true + } + }, + "operator": "+", + "right": { + "type": "Literal", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": 3, + "rawValue": 3, + "raw": "3" + } + } + } + ] + } +} \ 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..df6409e3a6 --- /dev/null +++ b/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json @@ -0,0 +1,135 @@ +{ + "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": "Literal", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + }, + "value": 4, + "rawValue": 4, + "raw": "4" + }, + "operator": "+", + "right": { + "type": "Literal", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "value": 5, + "rawValue": 5, + "raw": "5" + } + }, + "operator": "<<", + "right": { + "type": "Literal", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": 6, + "rawValue": 6, + "raw": "6", + "parenthesizedExpression": true + } + } + } + ] + } +} \ 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..b353ef2c83 --- /dev/null +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json @@ -0,0 +1,129 @@ +{ + "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": [], + "parenthesizedExpression": true + }, + "property": { + "type": "Identifier", + "start": 11, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "bar" + }, + "computed": false + }, + "arguments": [] + } + } + ] + } +} \ 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..6105d2841a --- /dev/null +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json @@ -0,0 +1,81 @@ +{ + "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", + "parenthesizedExpression": true + }, + "arguments": [] + } + } + ] + } +} \ 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..cca9b0fc82 --- /dev/null +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json @@ -0,0 +1,130 @@ +{ + "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": "Literal", + "start": 9, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": 42, + "rawValue": 42, + "raw": "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 + } + } + ] + } +} \ 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..463a77c2e5 --- /dev/null +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json @@ -0,0 +1,131 @@ +{ + "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": "Literal", + "start": 9, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + ] + }, + "property": { + "type": "Identifier", + "start": 13, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "name": "galaxies" + }, + "computed": false + } + } + ] + } +} \ 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..fab1521321 --- /dev/null +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json @@ -0,0 +1,234 @@ +{ + "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": "Literal", + "start": 9, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": 42, + "rawValue": 42, + "raw": "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": "Literal", + "start": 22, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": 14, + "rawValue": 14, + "raw": "14" + }, + { + "type": "Literal", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "value": 3, + "rawValue": 3, + "raw": "3" + }, + { + "type": "Literal", + "start": 29, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": 77, + "rawValue": 77, + "raw": "77" + } + ] + }, + "property": { + "type": "Identifier", + "start": 33, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "name": "milkyway" + }, + "computed": false + } + } + ] + } +} \ 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..762a4f980c --- /dev/null +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json @@ -0,0 +1,195 @@ +{ + "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": "Literal", + "start": 40, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "value": 2014, + "rawValue": 2014, + "raw": "2014" + } + ] + } + } + ] + } +} \ 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-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/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_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_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/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_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_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_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_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_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_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_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/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/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/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/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/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/esprima/invalid-syntax/migrated_0092/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0092/expected.json new file mode 100644 index 0000000000..89326051bc --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0092/expected.json @@ -0,0 +1,118 @@ +{ + "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": 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": "a" + } + ], + "body": { + "type": "Literal", + "start": 10, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + } + ] + } +} \ 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..167116741e --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0092/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_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/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/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_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_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_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_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_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_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_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_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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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..e68fbb6aec --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0216/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_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/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/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/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/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..aca079ee39 --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0221/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_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..aca079ee39 --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0222/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_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/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/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json new file mode 100644 index 0000000000..a130c92268 --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The keyword 'implements' is reserved (1:37)" +} \ No newline at end of file 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/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json new file mode 100644 index 0000000000..c70c06968d --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The keyword 'interface' is reserved (1:37)" +} \ No newline at end of file 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/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json new file mode 100644 index 0000000000..ac7ab9bdb7 --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The keyword 'package' is reserved (1:37)" +} \ No newline at end of file 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/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json new file mode 100644 index 0000000000..735d540526 --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The keyword 'private' is reserved (1:37)" +} \ No newline at end of file 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/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json new file mode 100644 index 0000000000..a8145dcb6a --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The keyword 'protected' is reserved (1:37)" +} \ No newline at end of file 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/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json new file mode 100644 index 0000000000..232b3cba94 --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The keyword 'public' is reserved (1:37)" +} \ No newline at end of file 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/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json new file mode 100644 index 0000000000..47fe5aafaf --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The keyword 'static' is reserved (1:37)" +} \ No newline at end of file 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/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/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json new file mode 100644 index 0000000000..07d74757d4 --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The keyword 'static' is reserved (1:23)" +} \ No newline at end of file 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/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/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/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/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/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_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/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_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..5830cef10e --- /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": "MethodDefinition", + "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..8bb9a5f99b --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0270/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_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..6cc3ea74c2 --- /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": "MethodDefinition", + "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..8bb9a5f99b --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0271/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_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_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..0fa4cd9032 --- /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": "MethodDefinition", + "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/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..966e05ade4 --- /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": "MethodDefinition", + "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..2a73699bc2 --- /dev/null +++ b/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:18)" +} \ No newline at end of file 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..1d9fe4c071 --- /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": "Literal", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": true, + "rawValue": true, + "raw": "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 + } + ] + } + } + ] + } +} \ 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..de1ad554fa --- /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": "Literal", + "start": 13, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": true, + "rawValue": true, + "raw": "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" + } + } + ] + } + }, + "label": { + "type": "Identifier", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "name": "done" + } + } + ] + } +} \ 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..62a3160e6e --- /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": "Literal", + "start": 13, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": true, + "rawValue": true, + "raw": "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" + } + } + ] + } + }, + "label": { + "type": "Identifier", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "name": "done" + } + } + ] + } +} \ 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..afc5d3b147 --- /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": "Literal", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": true, + "rawValue": true, + "raw": "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__" + } + } + ] + } + }, + "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-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..9ea0854331 --- /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": "Literal", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": true, + "rawValue": true, + "raw": "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 + } + ] + } + } + ] + } +} \ 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..3cadc13b16 --- /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": "Literal", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": true, + "rawValue": true, + "raw": "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 + } + ] + } + } + ] + } +} \ 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..661b7b9d0a --- /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": "Literal", + "start": 13, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": true, + "rawValue": true, + "raw": "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" + } + } + ] + } + }, + "label": { + "type": "Identifier", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "name": "done" + } + } + ] + } +} \ 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..3c06ab2a96 --- /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": "Literal", + "start": 13, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": true, + "rawValue": true, + "raw": "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" + } + } + ] + } + }, + "label": { + "type": "Identifier", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "name": "done" + } + } + ] + } +} \ 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..9df58ecc04 --- /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": "Literal", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": true, + "rawValue": true, + "raw": "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__" + } + } + ] + } + }, + "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-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..6ba5acf72c --- /dev/null +++ b/test/fixtures/esprima/statement-expression/migrated_0002/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": "\\u0061", + "rawValue": "\\u0061", + "raw": "'\\\\u0061'" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..f78a5fc028 --- /dev/null +++ b/test/fixtures/esprima/statement-expression/migrated_0003/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": "a\\u0061", + "rawValue": "a\\u0061", + "raw": "'a\\\\u0061'" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..cf73b407c2 --- /dev/null +++ b/test/fixtures/esprima/statement-expression/migrated_0004/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": "\\u0061a", + "rawValue": "\\u0061a", + "raw": "'\\\\u0061a'" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..ab84cdb1ac --- /dev/null +++ b/test/fixtures/esprima/statement-expression/migrated_0005/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": "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": "Literal", + "start": 13, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": "\\u0061a ", + "rawValue": "\\u0061a ", + "raw": "'\\\\u0061a '" + } + } + ], + "kind": "var" + } + ] + } +} \ No newline at end of file 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..97e2c0b335 --- /dev/null +++ b/test/fixtures/esprima/statement-if/migrated_0001/expected.json @@ -0,0 +1,116 @@ +{ + "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": [] + }, + "parenthesizedExpression": true + } + }, + "alternate": null + } + ] + } +} \ 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..c1930814e6 --- /dev/null +++ b/test/fixtures/esprima/statement-if/migrated_0002/expected.json @@ -0,0 +1,132 @@ +{ + "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": "Literal", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + ], + "kind": "var" + }, + "alternate": null + } + ] + } +} \ 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_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..bede5565cc --- /dev/null +++ b/test/fixtures/esprima/statement-if/migrated_0005/expected.json @@ -0,0 +1,128 @@ +{ + "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": "Literal", + "start": 4, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "value": true, + "rawValue": true, + "raw": "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 + } + } + } + } + ] + } +} \ 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..79b23952bd --- /dev/null +++ b/test/fixtures/esprima/statement-if/migrated_0006/expected.json @@ -0,0 +1,128 @@ +{ + "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": "Literal", + "start": 4, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "value": true, + "rawValue": true, + "raw": "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 + } + } + } + } + ] + } +} \ No newline at end of file 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..a065c54055 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0000/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": "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": "Literal", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + ] + } +} \ 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..bcc441a257 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/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": "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": "Literal", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + ] + } +} \ 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..09c2e86050 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json @@ -0,0 +1,211 @@ +{ + "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" + } + } + } + ] + }, + "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": "Literal", + "start": 28, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": 10, + "rawValue": 10, + "raw": "10" + } + } + } + ] + } +} \ 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..7a2fd03273 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0003/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": "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": [] + }, + "test": { + "type": "Literal", + "start": 16, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + }, + { + "type": "ExpressionStatement", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "expression": { + "type": "Literal", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + } + ] + } + ] + } +} \ 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..a3c55814f4 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json @@ -0,0 +1,113 @@ +{ + "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": "Literal", + "start": 17, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + ] + } +} \ 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..1ee7296f46 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json @@ -0,0 +1,113 @@ +{ + "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": "Literal", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + ] + } +} \ 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..e3ddda1e17 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json @@ -0,0 +1,113 @@ +{ + "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": "Literal", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "value": true, + "rawValue": true, + "raw": "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": [] + } + } + } + ] + } +} \ 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..bf0cf79afd --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json @@ -0,0 +1,211 @@ +{ + "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": "Literal", + "start": 11, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 10, + "rawValue": 10, + "raw": "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" + } + } + } + ] + } + } + ] + } +} \ 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..0221127370 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json @@ -0,0 +1,115 @@ +{ + "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": "Literal", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "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_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..46c4e44c8f --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0011/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": "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": "Literal", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 0, + "rawValue": 0, + "raw": "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 + } + } + } + } + ] + } +} \ 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..5f7188a434 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0012/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": "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": "Literal", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 0, + "rawValue": 0, + "raw": "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 + } + } + } + } + ] + } +} \ 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..20b89977b6 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json @@ -0,0 +1,181 @@ +{ + "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": "Literal", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 0, + "rawValue": 0, + "raw": "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": "Literal", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": 1, + "rawValue": 1, + "raw": "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 + } + } + } + } + ] + } +} \ 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..66dff360f5 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json @@ -0,0 +1,164 @@ +{ + "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": "Literal", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "value": 0, + "rawValue": 0, + "raw": "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": "Literal", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + }, + "update": null, + "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/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..1943c72a2e --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json @@ -0,0 +1,196 @@ +{ + "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": "Literal", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "value": 0, + "rawValue": 0, + "raw": "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": "Literal", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": 42, + "rawValue": 42, + "raw": "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 + } + } + } + } + ] + } +} \ 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..ea41666efe --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json @@ -0,0 +1,245 @@ +{ + "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": "Literal", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "value": 0, + "rawValue": 0, + "raw": "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": "Literal", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": 42, + "rawValue": 42, + "raw": "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" + } + ] + } + } + } + ] + } +} \ 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/esprima/statement-iteration/migrated_0018/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0018/expected.json new file mode 100644 index 0000000000..50d29b5d32 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0018/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": "var" + }, + "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_0019/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0019/actual.js new file mode 100644 index 0000000000..406a3a3c22 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0019/actual.js @@ -0,0 +1 @@ +for (var x = 42 in list) process(x); diff --git a/test/fixtures/esprima/statement-iteration/migrated_0019/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0019/expected.json new file mode 100644 index 0000000000..7b65e7a6c3 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0019/expected.json @@ -0,0 +1,195 @@ +{ + "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": "ForInStatement", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "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": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "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" + } + } + ], + "kind": "var" + }, + "right": { + "type": "Identifier", + "start": 19, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "name": "list" + }, + "body": { + "type": "ExpressionStatement", + "start": 25, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "expression": { + "type": "CallExpression", + "start": 25, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 25, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "name": "process" + }, + "arguments": [ + { + "type": "Identifier", + "start": 33, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "name": "x" + } + ] + } + } + } + ] + } +} \ No newline at end of file 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_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/migrated_0022/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0022/actual.js new file mode 100644 index 0000000000..e10579bece --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0022/actual.js @@ -0,0 +1 @@ +for (var a = b = c = (d in e) in z); diff --git a/test/fixtures/esprima/statement-iteration/migrated_0022/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0022/expected.json new file mode 100644 index 0000000000..f08be47cf5 --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0022/expected.json @@ -0,0 +1,241 @@ +{ + "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": "ForInStatement", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "left": { + "type": "VariableDeclaration", + "start": 5, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 9, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": "a" + }, + "init": { + "type": "AssignmentExpression", + "start": 13, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "b" + }, + "right": { + "type": "AssignmentExpression", + "start": 17, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": "c" + }, + "right": { + "type": "BinaryExpression", + "start": 22, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "left": { + "type": "Identifier", + "start": 22, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "name": "d" + }, + "operator": "in", + "right": { + "type": "Identifier", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "name": "e" + }, + "parenthesizedExpression": true + } + } + } + } + ], + "kind": "var" + }, + "right": { + "type": "Identifier", + "start": 33, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "name": "z" + }, + "body": { + "type": "EmptyStatement", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + } + } + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/esprima/statement-iteration/migrated_0023/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0023/actual.js new file mode 100644 index 0000000000..dbbe45041a --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0023/actual.js @@ -0,0 +1 @@ +for (var i = function() { return 10 in [] } in list) process(x); diff --git a/test/fixtures/esprima/statement-iteration/migrated_0023/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0023/expected.json new file mode 100644 index 0000000000..b0f5f0232d --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0023/expected.json @@ -0,0 +1,278 @@ +{ + "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/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..eac72f5d2b --- /dev/null +++ b/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json @@ -0,0 +1,194 @@ +{ + "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": "Literal", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": 0, + "rawValue": 0, + "raw": "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 + } + } + } + } + ] + } +} \ 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-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-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..cddf16fc26 --- /dev/null +++ b/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json @@ -0,0 +1,128 @@ +{ + "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": "Literal", + "start": 14, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "value": true, + "rawValue": true, + "raw": "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" + } + } + ] + } +} \ 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..3f86692dc7 --- /dev/null +++ b/test/fixtures/esprima/statement-return/migrated_0000/expected.json @@ -0,0 +1,101 @@ +{ + "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 + } + ] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..f66370e4d6 --- /dev/null +++ b/test/fixtures/esprima/statement-return/migrated_0001/expected.json @@ -0,0 +1,101 @@ +{ + "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 + } + ] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..864565296e --- /dev/null +++ b/test/fixtures/esprima/statement-return/migrated_0002/expected.json @@ -0,0 +1,116 @@ +{ + "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" + } + } + ] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..9c0041eb71 --- /dev/null +++ b/test/fixtures/esprima/statement-return/migrated_0003/expected.json @@ -0,0 +1,148 @@ +{ + "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" + } + } + } + ] + }, + "parenthesizedExpression": true + } + } + ] + } +} \ 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..62e79f338e --- /dev/null +++ b/test/fixtures/esprima/statement-switch/migrated_0001/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": "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": "Literal", + "start": 23, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ] + } + ] + } +} \ 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..b29ad0f66d --- /dev/null +++ b/test/fixtures/esprima/statement-switch/migrated_0002/expected.json @@ -0,0 +1,198 @@ +{ + "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": "Literal", + "start": 23, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "value": 42, + "rawValue": 42, + "raw": "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 + } + ] + } + ] + } +} \ 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..fe437eefa7 --- /dev/null +++ b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json @@ -0,0 +1,118 @@ +{ + "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": "Property", + "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": "Literal", + "start": 17, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": "Error", + "rawValue": "Error", + "raw": "\"Error\"" + }, + "kind": "init" + } + ] + } + } + ] + } +} \ 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..a5b0f49382 --- /dev/null +++ b/test/fixtures/esprima/statement-variable/migrated_0002/expected.json @@ -0,0 +1,100 @@ +{ + "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": "Literal", + "start": 8, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..6ed6cc90fa --- /dev/null +++ b/test/fixtures/esprima/statement-variable/migrated_0003/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": "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": "Literal", + "start": 11, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": 42, + "rawValue": 42, + "raw": "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": "Literal", + "start": 27, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": 42, + "rawValue": 42, + "raw": "42" + } + } + ], + "kind": "var" + } + ] + } +} \ 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..6b9e9e3f3a --- /dev/null +++ b/test/fixtures/esprima/statement-variable/migrated_0004/expected.json @@ -0,0 +1,198 @@ +{ + "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": "Literal", + "start": 8, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "value": 14, + "rawValue": 14, + "raw": "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": "Literal", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "value": 3, + "rawValue": 3, + "raw": "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": "Literal", + "start": 23, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "value": 1977, + "rawValue": 1977, + "raw": "1977" + } + } + ], + "kind": "var" + } + ] + } +} \ 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/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/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/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/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 From 8887444cf71cf566c2b637b15bbf8fb4020210a0 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 11 Aug 2015 16:58:20 +0100 Subject: [PATCH 04/31] fix various bugs surfaced by the esprima test suite, remove some incorrect tests --- src/parser/expression.js | 29 +- src/parser/index.js | 9 +- src/parser/lval.js | 6 +- src/parser/statement.js | 39 +-- src/parser/util.js | 23 +- src/plugins/flow.js | 2 +- src/tokenizer/index.js | 31 +- src/tokenizer/state.js | 5 +- .../fixtures/core/uncategorised/248/actual.js | 1 - .../core/uncategorised/248/expected.json | 195 ------------ .../fixtures/core/uncategorised/249/actual.js | 1 - .../core/uncategorised/249/expected.json | 278 ------------------ .../core/uncategorised/504/options.json | 4 +- .../core/uncategorised/505/options.json | 4 +- .../core/uncategorised/506/options.json | 4 +- .../core/uncategorised/507/options.json | 4 +- .../core/uncategorised/508/options.json | 4 +- .../core/uncategorised/509/options.json | 4 +- .../core/uncategorised/510/options.json | 4 +- .../core/uncategorised/513/options.json | 2 +- .../dupe-param/options.json | 3 + .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../dupe-param-1/options.json | 3 + .../dupe-param-2/options.json | 3 + .../dupe-param-3/options.json | 3 + .../patterned-catch-dupe/options.json | 4 +- .../es2015-array-pattern/rest/options.json | 3 - .../invalid-var-init/options.json | 4 +- .../expected.json | 153 ++++++++++ .../invalid_super_access/options.json | 2 +- .../expected.json | 148 ++++++++++ .../invalid-syntax/migrated_0224/options.json | 4 +- .../invalid-syntax/migrated_0225/options.json | 4 +- .../invalid-syntax/migrated_0226/options.json | 4 +- .../invalid-syntax/migrated_0227/options.json | 4 +- .../invalid-syntax/migrated_0228/options.json | 4 +- .../invalid-syntax/migrated_0229/options.json | 4 +- .../invalid-syntax/migrated_0230/options.json | 4 +- .../invalid-syntax/migrated_0239/options.json | 4 +- .../harmony/uncategorised/334/expected.json | 128 ++++++++ .../harmony/uncategorised/335/expected.json | 152 ++++++++++ .../harmony/uncategorised/51/actual.js | 1 - .../harmony/uncategorised/51/expected.json | 119 -------- 45 files changed, 704 insertions(+), 703 deletions(-) delete mode 100644 test/fixtures/core/uncategorised/248/actual.js delete mode 100644 test/fixtures/core/uncategorised/248/expected.json delete mode 100644 test/fixtures/core/uncategorised/249/actual.js delete mode 100644 test/fixtures/core/uncategorised/249/expected.json create mode 100644 test/fixtures/esprima/declaration-function/dupe-param/options.json rename test/fixtures/esprima/es2015-array-binding-pattern/{invalid-elision-after-rest => .invalid-elision-after-rest}/actual.js (100%) rename test/fixtures/esprima/es2015-array-binding-pattern/{invalid-elision-after-rest => .invalid-elision-after-rest}/expected.json (100%) rename test/fixtures/esprima/es2015-array-binding-pattern/{invalid-elision-after-rest => .invalid-elision-after-rest}/options.json (100%) create mode 100644 test/fixtures/esprima/es2015-array-pattern/dupe-param-1/options.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/dupe-param-2/options.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/dupe-param-3/options.json delete mode 100644 test/fixtures/esprima/es2015-array-pattern/rest/options.json create mode 100644 test/fixtures/esprima/es2015-generator/generator-parameter-binding-property-reserved/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/expected.json create mode 100644 test/fixtures/harmony/uncategorised/334/expected.json create mode 100644 test/fixtures/harmony/uncategorised/335/expected.json delete mode 100644 test/fixtures/harmony/uncategorised/51/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/51/expected.json diff --git a/src/parser/expression.js b/src/parser/expression.js index 3169de84e5..9bd456fd1a 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -186,7 +186,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"); @@ -335,10 +335,8 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { return this.finishNode(node, "ThisExpression"); case tt._yield: - // NOTE: falls through to _let - if (!this.state.inGenerator && this.strict) this.unexpected(); + if (this.state.inGenerator) this.unexpected(); - case tt._let: case tt.name: node = this.startNode(); let id = this.parseIdentifier(true); @@ -363,7 +361,6 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { return id; - case tt._do: if (this.options.features["es7.doExpressions"]) { let node = this.startNode(); @@ -683,7 +680,7 @@ pp.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync, prop.kind = "init"; if (isPattern) { var illegalBinding = this.isKeyword(prop.key.name); - if (!illegalBinding && this.strict) { + if (!illegalBinding && this.state.strict) { illegalBinding = reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name); } if (illegalBinding) { @@ -772,19 +769,29 @@ pp.parseFunctionBody = function (node, allowExpression) { // 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`. - var checkLVal = this.strict; + var checkLVal = this.state.strict; + var checkLValStrict = false; + // arrow function if (allowExpression) checkLVal = true; + // normal function - if (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) checkLVal = true; + if (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { + checkLVal = true; + checkLValStrict = true; + } + 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)) { this.checkLVal(param, true, nameHash); } + this.state.strict = oldStrict; } }; @@ -828,8 +835,8 @@ pp.parseExprListItem = function (allowEmpty, refShorthandDefaultPos) { pp.parseIdentifier = function (liberal) { let node = this.startNode(); - if (this.isName()) { - if (!liberal && this.strict && reservedWords.strict(this.state.value)) { + if (this.match(tt.name)) { + if (!liberal && this.state.strict && reservedWords.strict(this.state.value)) { this.raise(this.state.start, "The keyword '" + this.state.value + "' is reserved"); } @@ -847,7 +854,7 @@ pp.parseIdentifier = 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); diff --git a/src/parser/index.js b/src/parser/index.js index 4185c725d9..80db85a465 100644 --- a/src/parser/index.js +++ b/src/parser/index.js @@ -1,4 +1,4 @@ -import { reservedWords, isKeyword } from "../util/identifier"; +import { reservedWords } from "../util/identifier"; import { getOptions } from "../options"; import Tokenizer from "../tokenizer"; @@ -8,17 +8,16 @@ export const plugins = {}; export default class Parser extends Tokenizer { constructor(options, input) { - super(input); + options = getOptions(options); + super(options, input); - this.options = getOptions(options); - this.isKeyword = isKeyword; + this.options = options; 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; // If enabled, skip leading hashbang line. if (this.state.pos === 0 && this.input[0] === "#" && this.input[1] === "!") { diff --git a/src/parser/lval.js b/src/parser/lval.js index 7ec54ae135..0d477fd10c 100644 --- a/src/parser/lval.js +++ b/src/parser/lval.js @@ -92,7 +92,7 @@ pp.parseSpread = function (refShorthandDefaultPos) { pp.parseRest = function () { let node = this.startNode(); this.next(); - if (this.isName() || this.match(tt.bracketL)) { + if (this.match(tt.name) || this.match(tt.bracketL)) { node.argument = this.parseBindingAtom(); } else { this.unexpected(); @@ -103,7 +103,7 @@ pp.parseRest = function () { // Parses lvalue (assignable) atom. pp.parseBindingAtom = function () { - if (this.isName()) { + if (this.match(tt.name)) { return this.parseIdentifier(true); } @@ -168,7 +168,7 @@ 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"); } diff --git a/src/parser/statement.js b/src/parser/statement.js index 559ab8ebda..9f5457f9c4 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -74,19 +74,6 @@ pp.parseStatement = function (declaration, topLevel) { case tt._try: return this.parseTryStatement(node); case tt._let: - // NOTE: falls through to _const - if (!this.strict) { - let state = this.state.clone(); - this.next(); - - var isBindingAtomStart = this.isName() || this.match(tt.braceL) || this.match(tt.bracketL); - - // set back lookahead - this.state = state; - - if (!isBindingAtomStart) break; - } - case tt._const: if (!declaration) this.unexpected(); // NOTE: falls through to _var @@ -171,7 +158,7 @@ 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(); @@ -232,9 +219,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); } @@ -274,7 +265,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(); @@ -343,7 +334,7 @@ pp.parseTryStatement = function (node) { 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"); @@ -376,7 +367,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); @@ -431,8 +422,8 @@ pp.parseBlock = function (allowStrict) { let stmt = this.parseStatement(true); node.body.push(stmt); if (first && allowStrict && this.isUseStrict(stmt)) { - oldStrict = this.strict; - this.setStrict(this.strict = true); + oldStrict = this.state.strict; + this.setStrict(this.state.strict = true); } first = false; } @@ -505,11 +496,11 @@ pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, op this.initFunction(node, isAsync); node.generator = this.eat(tt.star); - if (isStatement && !optionalId && !this.isName()) { + if (isStatement && !optionalId && !this.match(tt.name)) { this.unexpected(); } - if (this.isName()) { + if (this.match(tt.name)) { node.id = this.parseIdentifier(); } diff --git a/src/parser/util.js b/src/parser/util.js index 53f1e4b27d..784daad310 100644 --- a/src/parser/util.js +++ b/src/parser/util.js @@ -28,23 +28,6 @@ pp.expectRelational = function (op) { } }; -// TODO - -pp.isName = function () { - if (this.match(tt.name)) { - return true; - } else if (!this.strict) { - var keyword = this.state.type.keyword; - if (keyword === "let") { - return true; - } else if (keyword === "yield") { - return !this.state.inGenerator; - } - } - - return false; -}; - // Tests whether parsed token is a contextual keyword. pp.isContextual = function (name) { @@ -71,6 +54,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 4bc211ccb1..58bdb63a25 100644 --- a/src/plugins/flow.js +++ b/src/plugins/flow.js @@ -609,7 +609,7 @@ export default function (instance) { 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") { + if (this.state.strict && this.match(tt.name) && this.state.value === "interface") { var node = this.startNode(); this.next(); return this.flowParseInterface(node); diff --git a/src/tokenizer/index.js b/src/tokenizer/index.js index 7bff031091..c2248cb4fb 100644 --- a/src/tokenizer/index.js +++ b/src/tokenizer/index.js @@ -1,4 +1,4 @@ -import { isIdentifierStart, isIdentifierChar } from "../util/identifier"; +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"; @@ -48,9 +48,9 @@ function codePointToString(code) { } 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 @@ -84,6 +84,22 @@ export default class Tokenizer { // TODO + isKeyword(word) { + if (!this.state.strict) { + if (word === "yield" && !this.state.inGenerator) { + return false; + } + + if (word === "let") { + // check if next token is a name, braceL or bracketL, if so, it's a keyword! + } + } + + return isKeyword(word); + } + + // TODO + lookahead() { var old = this.state; this.state = old.clone(); @@ -97,7 +113,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) { @@ -589,7 +605,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,7 +721,7 @@ export default class Tokenizer { octalStr = octalStr.slice(0, -1); octal = parseInt(octalStr, 8); } - if (octal > 0 && (this.strict || inTemplate)) { + if (octal > 0 && (this.state.strict || inTemplate)) { this.raise(this.state.pos - 2, "Octal literal in strict mode"); } this.state.pos += octalStr.length - 1; @@ -769,8 +785,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..d5099ccaeb 100644 --- a/src/tokenizer/state.js +++ b/src/tokenizer/state.js @@ -3,7 +3,10 @@ import { types as ct } from "./context"; import { types as tt } from "./types"; export default class State { - init(input) { + init(options, input) { + // strict + this.strict = options.strictMode === false ? false : options.sourceType === "module"; + this.input = input; // Used to signify the start of a potential arrow function 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/248/expected.json b/test/fixtures/core/uncategorised/248/expected.json deleted file mode 100644 index 7b65e7a6c3..0000000000 --- a/test/fixtures/core/uncategorised/248/expected.json +++ /dev/null @@ -1,195 +0,0 @@ -{ - "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": "ForInStatement", - "start": 0, - "end": 36, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 36 - } - }, - "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": "Identifier", - "start": 9, - "end": 10, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 10 - } - }, - "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" - } - } - ], - "kind": "var" - }, - "right": { - "type": "Identifier", - "start": 19, - "end": 23, - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 23 - } - }, - "name": "list" - }, - "body": { - "type": "ExpressionStatement", - "start": 25, - "end": 36, - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 36 - } - }, - "expression": { - "type": "CallExpression", - "start": 25, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 35 - } - }, - "callee": { - "type": "Identifier", - "start": 25, - "end": 32, - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 32 - } - }, - "name": "process" - }, - "arguments": [ - { - "type": "Identifier", - "start": 33, - "end": 34, - "loc": { - "start": { - "line": 1, - "column": 33 - }, - "end": { - "line": 1, - "column": 34 - } - }, - "name": "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/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/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/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/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/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/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/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/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/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/es2015-array-binding-pattern/invalid-elision-after-rest/actual.js b/test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/actual.js similarity index 100% rename from test/fixtures/esprima/es2015-array-binding-pattern/invalid-elision-after-rest/actual.js rename to test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-array-binding-pattern/invalid-elision-after-rest/expected.json rename to test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-array-binding-pattern/invalid-elision-after-rest/options.json rename to test/fixtures/esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/options.json 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/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/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/patterned-catch-dupe/options.json b/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json index aca079ee39..7d5bec6e9b 100644 --- a/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json +++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:20)" -} \ No newline at end of file + "throws": "Argument name clash in strict mode (1:17)" +} diff --git a/test/fixtures/esprima/es2015-array-pattern/rest/options.json b/test/fixtures/esprima/es2015-array-pattern/rest/options.json deleted file mode 100644 index 328b1ddde8..0000000000 --- a/test/fixtures/esprima/es2015-array-pattern/rest/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Unexpected token (1:10)" -} \ 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 index 89e36d9013..98d7123790 100644 --- a/test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json +++ b/test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:16)" -} \ No newline at end of file + "throws": "Unexpected token (1:15)" +} 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-super-property/invalid_super_access/options.json b/test/fixtures/esprima/es2015-super-property/invalid_super_access/options.json index 18fe6d12a8..2c472e02d3 100644 --- a/test/fixtures/esprima/es2015-super-property/invalid_super_access/options.json +++ b/test/fixtures/esprima/es2015-super-property/invalid_super_access/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected super (3:9)" + "throws": "Unexpected super (3:14)" } 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/invalid-syntax/migrated_0224/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json index a130c92268..570ca31728 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0224/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/esprima/invalid-syntax/migrated_0225/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json index c70c06968d..dfe4eddc2a 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0225/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/esprima/invalid-syntax/migrated_0226/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json index ac7ab9bdb7..766ddb41ca 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0226/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/esprima/invalid-syntax/migrated_0227/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json index 735d540526..9a7c12e0a6 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0227/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/esprima/invalid-syntax/migrated_0228/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json index a8145dcb6a..ba43694c8d 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0228/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/esprima/invalid-syntax/migrated_0229/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json index 232b3cba94..b1dbd863ed 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0229/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/esprima/invalid-syntax/migrated_0230/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json index 47fe5aafaf..75ad83ddbb 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0230/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/esprima/invalid-syntax/migrated_0239/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json index 07d74757d4..b3e95a5757 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json @@ -1,3 +1,3 @@ { - "throws": "The keyword 'static' is reserved (1:23)" -} \ No newline at end of file + "throws": "Binding static in strict mode (1:23)" +} 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/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/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/51/expected.json b/test/fixtures/harmony/uncategorised/51/expected.json deleted file mode 100644 index 0fe0e61786..0000000000 --- a/test/fixtures/harmony/uncategorised/51/expected.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "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": 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": "a" - } - ], - "body": { - "type": "Literal", - "start": 10, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 10 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "value": 42, - "rawValue": 42, - "raw": "42" - } - } - } - ] - }, - "comments": [] -} \ No newline at end of file From 860322f7b8ed788a254ce31c6fff23e27bb4086f Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 12 Aug 2015 02:57:18 +0100 Subject: [PATCH 05/31] add more jsx tests --- .../jsx/basic/{9 => empty-expression-container}/actual.js | 0 .../jsx/basic/{9 => empty-expression-container}/expected.json | 0 test/fixtures/jsx/basic/keyword-tag/actual.js | 1 + test/fixtures/jsx/basic/namespace-tag/actual.js | 2 ++ test/fixtures/jsx/errors/wrong-closing-tag/actual.js | 1 + test/fixtures/jsx/errors/wrong-closing-tag/options.json | 3 +++ 6 files changed, 7 insertions(+) rename test/fixtures/jsx/basic/{9 => empty-expression-container}/actual.js (100%) rename test/fixtures/jsx/basic/{9 => empty-expression-container}/expected.json (100%) create mode 100644 test/fixtures/jsx/basic/keyword-tag/actual.js create mode 100644 test/fixtures/jsx/basic/namespace-tag/actual.js create mode 100644 test/fixtures/jsx/errors/wrong-closing-tag/actual.js create mode 100644 test/fixtures/jsx/errors/wrong-closing-tag/options.json 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 100% rename from test/fixtures/jsx/basic/9/expected.json rename to test/fixtures/jsx/basic/empty-expression-container/expected.json 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/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/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)" +} From ac9ee75dac9fd9cb7c4259bba7467843600d5458 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sat, 15 Aug 2015 19:07:42 -0400 Subject: [PATCH 06/31] parser: don't mutate or clone state arrays when doing a lookahead - fixes #2211 --- src/tokenizer/index.js | 18 +++++++++++++----- src/tokenizer/state.js | 8 ++++++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/tokenizer/index.js b/src/tokenizer/index.js index c2248cb4fb..c8b06ef0d6 100644 --- a/src/tokenizer/index.js +++ b/src/tokenizer/index.js @@ -56,7 +56,9 @@ export default class Tokenizer { // 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; @@ -102,9 +104,13 @@ export default class Tokenizer { lookahead() { var old = this.state; - this.state = old.clone(); + this.state = old.clone(true); + + this.isLookahead = true; this.next(); - var curr = this.state.clone(); + this.isLookahead = false; + + var curr = this.state.clone(true); this.state = old; return curr; } @@ -172,8 +178,10 @@ export default class Tokenizer { range: [start, end] }; - 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); } diff --git a/src/tokenizer/state.js b/src/tokenizer/state.js index d5099ccaeb..4765017de3 100644 --- a/src/tokenizer/state.js +++ b/src/tokenizer/state.js @@ -70,11 +70,15 @@ export default class State { return new Position(this.curLine, this.pos - this.lineStart); } - clone() { + clone(skipArrays?) { var state = new State; for (var key in this) { var val = this[key]; - if (Array.isArray(val)) val = val.slice(); + + if (!skipArrays && Array.isArray(val)) { + val = val.slice(); + } + state[key] = val; } return state; From 032ca7ae1c13b49c6291a7e868ac8a2c04e449ff Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 24 Aug 2015 15:31:30 -0400 Subject: [PATCH 07/31] never attempt to represent regexes natively --- src/tokenizer/index.js | 52 ++++-------------------------------------- 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/src/tokenizer/index.js b/src/tokenizer/index.js index c8b06ef0d6..f01912ba5b 100644 --- a/src/tokenizer/index.js +++ b/src/tokenizer/index.js @@ -17,29 +17,13 @@ export class Token { this.end = state.end; this.loc = new SourceLocation(state.startLoc, state.endLoc); } -} -// ## 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); - } + get range() { + return [this.start, this.end]; } } -var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u"); +// ## Tokenizer function codePointToString(code) { // UTF-16 Decoding @@ -516,41 +500,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 }); } From 6e24626482dafd415ec64490c88f59a9f9bbb8cd Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 24 Aug 2015 15:31:41 -0400 Subject: [PATCH 08/31] fix weird legacy acorn formatting --- src/tokenizer/index.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/tokenizer/index.js b/src/tokenizer/index.js index f01912ba5b..b1b4f16f0d 100644 --- a/src/tokenizer/index.js +++ b/src/tokenizer/index.js @@ -27,8 +27,11 @@ export class Token { function codePointToString(code) { // UTF-16 Decoding - if (code <= 0xFFFF) return String.fromCharCode(code); - return String.fromCharCode(((code - 0x10000) >> 10) + 0xD800, ((code - 0x10000) & 1023) + 0xDC00); + if (code <= 0xFFFF) { + return String.fromCharCode(code); + } else { + return String.fromCharCode(((code - 0x10000) >> 10) + 0xD800, ((code - 0x10000) & 1023) + 0xDC00); + } } export default class Tokenizer { @@ -138,10 +141,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() { @@ -166,6 +170,7 @@ export default class Tokenizer { this.state.tokens.push(comment); this.state.comments.push(comment); } + this.addComment(comment); } From 446b297465ebf986228188be6217b9b607393f9b Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 1 Sep 2015 04:49:16 +0100 Subject: [PATCH 09/31] unoverload Literal AST node --- src/parser/expression.js | 41 ++- src/parser/statement.js | 2 +- src/parser/util.js | 2 +- src/plugins/jsx/index.js | 2 +- .../surrounding-throw-comments/expected.json | 2 +- .../expected.json | 2 +- .../expected.json | 4 +- .../switch-fallthrough-comment/expected.json | 4 +- .../expected.json | 4 +- .../expected.json | 6 +- .../switch-no-default-comment/expected.json | 2 +- .../regex-after-block/expected.json | 10 +- .../core/uncategorised/10/expected.json | 2 +- .../core/uncategorised/100/expected.json | 2 +- .../core/uncategorised/101/expected.json | 2 +- .../core/uncategorised/102/expected.json | 10 +- .../core/uncategorised/103/expected.json | 10 +- .../core/uncategorised/104/expected.json | 10 +- .../core/uncategorised/105/expected.json | 10 +- .../core/uncategorised/106/expected.json | 10 +- .../core/uncategorised/107/expected.json | 10 +- .../core/uncategorised/108/expected.json | 10 +- .../core/uncategorised/11/expected.json | 2 +- .../core/uncategorised/12/expected.json | 6 +- .../core/uncategorised/124/expected.json | 2 +- .../core/uncategorised/125/expected.json | 2 +- .../core/uncategorised/126/expected.json | 8 +- .../core/uncategorised/127/expected.json | 2 +- .../core/uncategorised/13/expected.json | 6 +- .../core/uncategorised/197/expected.json | 4 +- .../core/uncategorised/198/expected.json | 4 +- .../core/uncategorised/199/expected.json | 2 +- .../core/uncategorised/2/expected.json | 7 +- .../core/uncategorised/200/expected.json | 2 +- .../core/uncategorised/201/expected.json | 2 +- .../core/uncategorised/202/expected.json | 2 +- .../core/uncategorised/203/expected.json | 2 +- .../core/uncategorised/204/expected.json | 2 +- .../core/uncategorised/205/expected.json | 2 +- .../core/uncategorised/206/expected.json | 2 +- .../core/uncategorised/207/expected.json | 2 +- .../core/uncategorised/208/expected.json | 2 +- .../core/uncategorised/209/expected.json | 2 +- .../core/uncategorised/210/expected.json | 2 +- .../core/uncategorised/211/expected.json | 2 +- .../core/uncategorised/212/expected.json | 2 +- .../core/uncategorised/218/expected.json | 2 +- .../core/uncategorised/219/expected.json | 4 +- .../core/uncategorised/22/expected.json | 2 +- .../core/uncategorised/220/expected.json | 6 +- .../core/uncategorised/23/expected.json | 2 +- .../core/uncategorised/230/expected.json | 2 +- .../core/uncategorised/232/expected.json | 2 +- .../core/uncategorised/233/expected.json | 2 +- .../core/uncategorised/234/expected.json | 2 +- .../core/uncategorised/235/expected.json | 4 +- .../core/uncategorised/236/expected.json | 2 +- .../core/uncategorised/237/expected.json | 2 +- .../core/uncategorised/24/expected.json | 2 +- .../core/uncategorised/240/expected.json | 2 +- .../core/uncategorised/241/expected.json | 2 +- .../core/uncategorised/242/expected.json | 4 +- .../core/uncategorised/243/expected.json | 4 +- .../core/uncategorised/244/expected.json | 4 +- .../core/uncategorised/245/expected.json | 4 +- .../core/uncategorised/25/expected.json | 2 +- .../core/uncategorised/250/expected.json | 2 +- .../core/uncategorised/251/expected.json | 2 +- .../core/uncategorised/252/expected.json | 2 +- .../core/uncategorised/253/expected.json | 2 +- .../core/uncategorised/254/expected.json | 2 +- .../core/uncategorised/255/expected.json | 2 +- .../core/uncategorised/256/expected.json | 2 +- .../core/uncategorised/26/expected.json | 2 +- .../core/uncategorised/269/expected.json | 2 +- .../core/uncategorised/27/expected.json | 4 +- .../core/uncategorised/270/expected.json | 2 +- .../core/uncategorised/272/expected.json | 2 +- .../core/uncategorised/275/expected.json | 2 +- .../core/uncategorised/28/expected.json | 4 +- .../core/uncategorised/289/expected.json | 2 +- .../core/uncategorised/3/expected.json | 2 +- .../core/uncategorised/303/expected.json | 4 +- .../core/uncategorised/304/expected.json | 2 +- .../core/uncategorised/305/expected.json | 26 +- .../core/uncategorised/306/expected.json | 26 +- .../core/uncategorised/307/expected.json | 2 +- .../core/uncategorised/308/expected.json | 26 +- .../core/uncategorised/309/expected.json | 26 +- .../core/uncategorised/317/expected.json | 2 +- .../core/uncategorised/318/expected.json | 4 +- .../core/uncategorised/319/expected.json | 4 +- .../core/uncategorised/320/expected.json | 4 +- .../core/uncategorised/322/expected.json | 2 +- .../core/uncategorised/323/expected.json | 4 +- .../core/uncategorised/324/expected.json | 12 +- .../core/uncategorised/341/expected.json | 10 +- .../core/uncategorised/343/expected.json | 26 +- .../core/uncategorised/344/expected.json | 2 +- .../core/uncategorised/35/expected.json | 2 +- .../core/uncategorised/36/expected.json | 2 +- .../core/uncategorised/4/expected.json | 10 +- .../core/uncategorised/42/expected.json | 2 +- .../core/uncategorised/43/expected.json | 2 +- .../core/uncategorised/44/expected.json | 2 +- .../core/uncategorised/45/expected.json | 2 +- .../core/uncategorised/46/expected.json | 26 +- .../core/uncategorised/47/expected.json | 46 ++- .../core/uncategorised/48/expected.json | 46 ++- .../core/uncategorised/49/expected.json | 26 +- .../core/uncategorised/5/expected.json | 10 +- .../core/uncategorised/50/expected.json | 26 +- .../core/uncategorised/51/expected.json | 26 +- .../core/uncategorised/52/expected.json | 26 +- .../core/uncategorised/527/expected.json | 2 +- .../core/uncategorised/528/expected.json | 4 +- .../core/uncategorised/529/expected.json | 6 +- .../core/uncategorised/53/expected.json | 26 +- .../core/uncategorised/530/expected.json | 2 +- .../core/uncategorised/531/expected.json | 4 +- .../core/uncategorised/533/expected.json | 2 +- .../core/uncategorised/534/expected.json | 4 +- .../core/uncategorised/535/expected.json | 6 +- .../core/uncategorised/537/expected.json | 5 +- .../core/uncategorised/54/expected.json | 26 +- .../core/uncategorised/540/expected.json | 2 +- .../core/uncategorised/541/expected.json | 10 +- .../core/uncategorised/55/expected.json | 26 +- .../core/uncategorised/56/expected.json | 26 +- .../core/uncategorised/59/expected.json | 26 +- .../core/uncategorised/6/expected.json | 6 +- .../core/uncategorised/62/expected.json | 26 +- .../core/uncategorised/63/expected.json | 46 ++- .../core/uncategorised/65/expected.json | 26 +- .../core/uncategorised/66/expected.json | 2 +- .../core/uncategorised/67/expected.json | 2 +- .../core/uncategorised/68/expected.json | 2 +- .../core/uncategorised/69/expected.json | 2 +- .../core/uncategorised/70/expected.json | 2 +- .../core/uncategorised/71/expected.json | 2 +- .../core/uncategorised/72/expected.json | 2 +- .../core/uncategorised/73/expected.json | 2 +- .../core/uncategorised/74/expected.json | 2 +- .../core/uncategorised/75/expected.json | 2 +- .../core/uncategorised/76/expected.json | 2 +- .../core/uncategorised/77/expected.json | 2 +- .../core/uncategorised/78/expected.json | 2 +- .../core/uncategorised/79/expected.json | 2 +- .../core/uncategorised/80/expected.json | 2 +- .../core/uncategorised/81/expected.json | 2 +- .../core/uncategorised/82/expected.json | 2 +- .../core/uncategorised/83/expected.json | 2 +- .../core/uncategorised/84/expected.json | 2 +- .../core/uncategorised/85/expected.json | 2 +- .../core/uncategorised/86/expected.json | 2 +- .../core/uncategorised/87/expected.json | 2 +- .../core/uncategorised/88/expected.json | 2 +- .../core/uncategorised/89/expected.json | 2 +- .../core/uncategorised/9/expected.json | 2 +- .../core/uncategorised/90/expected.json | 2 +- .../core/uncategorised/91/expected.json | 2 +- .../core/uncategorised/92/expected.json | 2 +- .../core/uncategorised/93/expected.json | 2 +- .../core/uncategorised/94/expected.json | 2 +- .../core/uncategorised/95/expected.json | 2 +- .../core/uncategorised/96/expected.json | 2 +- .../core/uncategorised/97/expected.json | 2 +- .../core/uncategorised/98/expected.json | 2 +- .../core/uncategorised/99/expected.json | 2 +- .../migrated_0003/expected.json | 4 +- .../migrated_0004/expected.json | 2 +- .../migrated_0005/expected.json | 2 +- .../migrated_0006/expected.json | 2 +- .../migrated_0007/expected.json | 2 +- .../migrated_0008/expected.json | 2 +- .../migrated_0009/expected.json | 2 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 6 +- .../empty-param/expected.json | 2 +- .../migrated_0005/expected.json | 2 +- .../migrated_0014/expected.json | 4 +- .../migrated_0002/expected.json | 2 +- .../migrated_0003/expected.json | 6 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../array-binding-pattern-01/expected.json | 2 +- .../array-binding-pattern-02/expected.json | 2 +- .../array-binding-pattern-03/expected.json | 2 +- .../array-binding-pattern-empty/expected.json | 2 +- .../elision/expected.json | 2 +- .../elision/expected.json | 2 +- .../empty-pattern-var/expected.json | 2 +- .../es2015-array-pattern/hole/expected.json | 2 +- .../nested-pattern/expected.json | 2 +- .../patterned-catch/expected.json | 4 +- .../es2015-array-pattern/rest/expected.json | 2 +- .../tailing-hold/expected.json | 2 +- .../with-default-catch-param/expected.json | 2 +- .../with-default-fn/expected.json | 2 +- .../with-object-pattern/expected.json | 2 +- .../expected.json | 2 +- .../arrow-with-only-rest/expected.json | 2 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../migrated_0003/expected.json | 2 +- .../migrated_0004/expected.json | 2 +- .../migrated_0005/expected.json | 2 +- .../migrated_0006/expected.json | 2 +- .../migrated_0007/expected.json | 2 +- .../migrated_0008/expected.json | 2 +- .../migrated_0009/expected.json | 2 +- .../migrated_0010/expected.json | 2 +- .../migrated_0011/expected.json | 2 +- .../migrated_0012/expected.json | 2 +- .../migrated_0013/expected.json | 4 +- .../migrated_0014/expected.json | 4 +- .../migrated_0016/expected.json | 2 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../migrated_0003/expected.json | 2 +- .../migrated_0004/expected.json | 2 +- .../migrated_0005/expected.json | 2 +- .../es2015-class/migrated_0001/expected.json | 2 +- .../es2015-class/migrated_0016/expected.json | 2 +- .../es2015-class/migrated_0019/expected.json | 4 +- .../es2015-class/migrated_0021/expected.json | 2 +- .../es2015-class/migrated_0024/expected.json | 2 +- .../es2015-class/migrated_0025/expected.json | 2 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../dup-assignment/expected.json | 2 +- .../elision/expected.json | 2 +- .../member-expr-in-rest/expected.json | 4 +- .../nested-assignment/expected.json | 6 +- .../nested-cover-grammar/expected.json | 2 +- .../simple-assignment/expected.json | 2 +- .../expected.json | 2 +- .../nested-cover-grammar/expected.json | 4 +- .../object-pattern-assignment/expected.json | 2 +- .../export-const-number/expected.json | 2 +- .../export-default-expression/expected.json | 4 +- .../export-default-number/expected.json | 2 +- .../export-default-object/expected.json | 2 +- .../export-from-batch/expected.json | 2 +- .../export-from-default/expected.json | 2 +- .../expected.json | 2 +- .../expected.json | 2 +- .../expected.json | 2 +- .../export-from-specifier/expected.json | 2 +- .../export-from-specifiers/expected.json | 2 +- .../export-function-declaration/expected.json | 2 +- .../export-let-number/expected.json | 2 +- .../export-var-number/expected.json | 2 +- .../expected.json | 2 +- .../expected.json | 2 +- .../expected.json | 2 +- .../expected.json | 2 +- .../expected.json | 2 +- .../expected.json | 2 +- .../module_await/expected.json | 2 +- .../expected.json | 2 +- .../expected.json | 2 +- .../import-default-as/expected.json | 2 +- .../import-default/expected.json | 2 +- .../import-jquery/expected.json | 2 +- .../import-module/expected.json | 2 +- .../import-named-as-specifier/expected.json | 2 +- .../import-named-as-specifiers/expected.json | 2 +- .../import-named-empty/expected.json | 2 +- .../import-named-specifier/expected.json | 2 +- .../expected.json | 2 +- .../import-named-specifiers/expected.json | 2 +- .../import-namespace-specifier/expected.json | 2 +- .../import-null-as-nil/expected.json | 2 +- .../migrated_0000/expected.json | 4 +- .../migrated_0002/expected.json | 2 +- .../expected.json | 238 +++++++++++++++ .../expected.json | 168 ++++++++++ .../expected.json | 168 ++++++++++ .../invalid-proto-literals/expected.json | 170 +++++++++++ .../expected.json | 255 ++++++++++++++++ .../expected.json | 7 +- .../proto-identifier-getter/expected.json | 7 +- .../proto-identifier-method/expected.json | 7 +- .../proto-identifier-setter/expected.json | 7 +- .../proto-literal-getter-setter/expected.json | 9 +- .../proto-literal-getter/expected.json | 9 +- .../proto-literal-method/expected.json | 9 +- .../proto-literal-setter/expected.json | 9 +- .../elision/expected.json | 2 +- .../empty-for-lex/expected.json | 2 +- .../empty-lexical/expected.json | 2 +- .../empty-var/expected.json | 2 +- .../nested/expected.json | 2 +- .../properties/expected.json | 6 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 4 +- .../migrated_0003/expected.json | 2 +- .../migrated_0004/expected.json | 2 +- .../migrated_0005/expected.json | 2 +- .../migrated_0006/expected.json | 4 +- .../call-spread-number/expected.json | 2 +- .../new-spread-number/expected.json | 2 +- .../super_computed/expected.json | 2 +- .../escape-sequences/expected.json | 2 +- .../line-terminators/expected.json | 2 +- .../literal-escape-sequences/expected.json | 2 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../yield-arrow-parameter-name/expected.json | 2 +- .../yield-lexical-declaration/expected.json | 4 +- .../expected.json | 2 +- .../yield-strict-method/expected.json | 2 +- .../migrated_0002/expected.json | 4 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../migrated_0003/expected.json | 2 +- .../migrated_0004/expected.json | 2 +- .../migrated_0005/expected.json | 2 +- .../migrated_0006/expected.json | 2 +- .../migrated_0007/expected.json | 2 +- .../migrated_0008/expected.json | 2 +- .../migrated_0009/expected.json | 2 +- .../migrated_0010/expected.json | 2 +- .../migrated_0011/expected.json | 2 +- .../migrated_0012/expected.json | 2 +- .../migrated_0013/expected.json | 2 +- .../migrated_0000/expected.json | 4 +- .../migrated_0001/expected.json | 4 +- .../migrated_0002/expected.json | 6 +- .../migrated_0000/expected.json | 6 +- .../migrated_0001/expected.json | 6 +- .../migrated_0015/expected.json | 2 +- .../migrated_0016/expected.json | 2 +- .../migrated_0017/expected.json | 8 +- .../migrated_0018/expected.json | 2 +- .../migrated_0035/expected.json | 102 +++++++ .../invalid-syntax/migrated_0092/options.json | 4 +- .../invalid-syntax/migrated_0239/options.json | 2 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../migrated_0003/expected.json | 2 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../migrated_0003/expected.json | 2 +- .../migrated_0004/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../migrated_0003/expected.json | 2 +- .../migrated_0004/expected.json | 2 +- .../migrated_0005/expected.json | 2 +- .../statement-if/migrated_0002/expected.json | 2 +- .../statement-if/migrated_0005/expected.json | 2 +- .../statement-if/migrated_0006/expected.json | 2 +- .../migrated_0000/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../migrated_0003/expected.json | 4 +- .../migrated_0004/expected.json | 2 +- .../migrated_0005/expected.json | 2 +- .../migrated_0006/expected.json | 2 +- .../migrated_0007/expected.json | 2 +- .../migrated_0010/expected.json | 2 +- .../migrated_0011/expected.json | 2 +- .../migrated_0012/expected.json | 2 +- .../migrated_0013/expected.json | 4 +- .../migrated_0014/expected.json | 4 +- .../migrated_0015/expected.json | 4 +- .../migrated_0016/expected.json | 4 +- .../migrated_0025/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0001/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../migrated_0002/expected.json | 2 +- .../migrated_0003/expected.json | 4 +- .../migrated_0004/expected.json | 6 +- .../async-functions/pattern/expected.json | 2 +- .../uncategorised/21/expected.json | 2 +- .../uncategorised/26/expected.json | 7 +- .../uncategorised/28/expected.json | 5 +- .../uncategorised/3/expected.json | 2 +- .../uncategorised/30/expected.json | 2 +- .../uncategorised/39/expected.json | 2 +- .../uncategorised/4/expected.json | 4 +- .../uncategorised/43/expected.json | 2 +- .../uncategorised/46/expected.json | 2 +- .../uncategorised/47/expected.json | 2 +- .../uncategorised/48/expected.json | 2 +- .../uncategorised/49/expected.json | 2 +- .../uncategorised/5/expected.json | 6 +- .../uncategorised/50/expected.json | 2 +- .../uncategorised/51/expected.json | 2 +- .../uncategorised/52/expected.json | 2 +- .../uncategorised/53/expected.json | 2 +- .../uncategorised/54/expected.json | 2 +- .../uncategorised/55/expected.json | 4 +- .../uncategorised/58/expected.json | 2 +- .../uncategorised/6/expected.json | 6 +- .../uncategorised/62/expected.json | 9 +- .../uncategorised/7/expected.json | 6 +- .../uncategorised/8/expected.json | 6 +- .../flow/declare-module/2/expected.json | 5 +- .../flow/regression/issue-2083/expected.json | 4 +- test/fixtures/flow/tuples/3/expected.json | 5 +- test/fixtures/flow/tuples/4/expected.json | 7 +- .../flow/type-annotations/26/expected.json | 5 +- .../flow/type-annotations/44/expected.json | 9 +- .../flow/type-annotations/50/expected.json | 5 +- .../flow/type-annotations/51/expected.json | 5 +- .../flow/type-annotations/55/expected.json | 5 +- .../flow/type-annotations/60/expected.json | 5 +- .../flow/type-annotations/61/expected.json | 5 +- .../flow/type-annotations/62/expected.json | 5 +- .../flow/type-annotations/89/expected.json | 5 +- .../flow/type-annotations/90/expected.json | 5 +- .../flow/type-annotations/91/expected.json | 5 +- .../flow/type-annotations/92/expected.json | 5 +- .../flow/type-annotations/93/expected.json | 5 +- .../flow/type-annotations/94/expected.json | 5 +- .../flow/type-annotations/95/expected.json | 5 +- .../flow/type-annotations/96/expected.json | 5 +- .../type-exports/specifier-from/expected.json | 4 +- test/fixtures/flow/typecasts/2/expected.json | 7 +- test/fixtures/flow/typecasts/3/expected.json | 5 +- .../call-expression/expected.json | 5 +- .../harmony/uncategorised/1/expected.json | 5 +- .../harmony/uncategorised/10/expected.json | 5 +- .../harmony/uncategorised/106/expected.json | 5 +- .../harmony/uncategorised/11/expected.json | 5 +- .../harmony/uncategorised/12/expected.json | 5 +- .../harmony/uncategorised/123/expected.json | 5 +- .../harmony/uncategorised/124/expected.json | 2 +- .../harmony/uncategorised/13/expected.json | 5 +- .../harmony/uncategorised/130/expected.json | 5 +- .../harmony/uncategorised/14/expected.json | 5 +- .../harmony/uncategorised/141/expected.json | 5 +- .../harmony/uncategorised/142/expected.json | 9 +- .../harmony/uncategorised/144/expected.json | 7 +- .../harmony/uncategorised/15/expected.json | 5 +- .../harmony/uncategorised/152/expected.json | 7 +- .../harmony/uncategorised/153/expected.json | 7 +- .../harmony/uncategorised/154/expected.json | 7 +- .../harmony/uncategorised/155/expected.json | 7 +- .../harmony/uncategorised/156/expected.json | 7 +- .../harmony/uncategorised/157/expected.json | 7 +- .../harmony/uncategorised/158/expected.json | 5 +- .../harmony/uncategorised/159/expected.json | 7 +- .../harmony/uncategorised/16/expected.json | 5 +- .../harmony/uncategorised/160/expected.json | 7 +- .../harmony/uncategorised/161/expected.json | 7 +- .../harmony/uncategorised/162/expected.json | 7 +- .../harmony/uncategorised/17/expected.json | 5 +- .../harmony/uncategorised/195/expected.json | 8 +- .../harmony/uncategorised/196/expected.json | 8 +- .../harmony/uncategorised/197/expected.json | 2 +- .../harmony/uncategorised/2/expected.json | 5 +- .../harmony/uncategorised/256/expected.json | 5 +- .../harmony/uncategorised/257/expected.json | 5 +- .../harmony/uncategorised/259/expected.json | 5 +- .../harmony/uncategorised/26/expected.json | 4 +- .../harmony/uncategorised/27/expected.json | 7 +- .../harmony/uncategorised/28/expected.json | 5 +- .../harmony/uncategorised/29/expected.json | 5 +- .../harmony/uncategorised/3/expected.json | 5 +- .../harmony/uncategorised/30/expected.json | 5 +- .../harmony/uncategorised/300/expected.json | 4 +- .../harmony/uncategorised/301/expected.json | 2 +- .../harmony/uncategorised/307/expected.json | 7 +- .../harmony/uncategorised/308/expected.json | 7 +- .../harmony/uncategorised/309/expected.json | 7 +- .../harmony/uncategorised/31/expected.json | 5 +- .../harmony/uncategorised/310/expected.json | 7 +- .../harmony/uncategorised/317/expected.json | 14 +- .../harmony/uncategorised/318/expected.json | 2 +- .../harmony/uncategorised/319/expected.json | 2 +- .../harmony/uncategorised/32/expected.json | 5 +- .../harmony/uncategorised/320/expected.json | 2 +- .../harmony/uncategorised/322/expected.json | 2 +- .../harmony/uncategorised/33/expected.json | 5 +- .../harmony/uncategorised/338/expected.json | 2 +- .../harmony/uncategorised/34/expected.json | 5 +- .../harmony/uncategorised/343/expected.json | 68 +++++ .../harmony/uncategorised/349/expected.json | 174 +++++++++++ .../harmony/uncategorised/35/expected.json | 5 +- .../harmony/uncategorised/36/expected.json | 5 +- .../harmony/uncategorised/39/expected.json | 5 +- .../harmony/uncategorised/4/expected.json | 5 +- .../harmony/uncategorised/40/expected.json | 5 +- .../harmony/uncategorised/41/expected.json | 5 +- .../harmony/uncategorised/42/expected.json | 5 +- .../harmony/uncategorised/43/expected.json | 5 +- .../harmony/uncategorised/44/expected.json | 7 +- .../harmony/uncategorised/45/expected.json | 7 +- .../harmony/uncategorised/47/expected.json | 5 +- .../harmony/uncategorised/5/expected.json | 7 +- .../harmony/uncategorised/54/expected.json | 5 +- .../harmony/uncategorised/6/expected.json | 5 +- .../harmony/uncategorised/7/expected.json | 5 +- .../harmony/uncategorised/79/expected.json | 5 +- .../harmony/uncategorised/8/expected.json | 5 +- .../harmony/uncategorised/85/expected.json | 5 +- .../harmony/uncategorised/9/expected.json | 7 +- .../harmony/uncategorised/90/expected.json | 5 +- .../harmony/uncategorised/91/expected.json | 5 +- .../harmony/uncategorised/92/expected.json | 5 +- .../harmony/uncategorised/93/expected.json | 5 +- .../harmony/uncategorised/94/expected.json | 5 +- .../harmony/uncategorised/95/expected.json | 5 +- .../harmony/uncategorised/97/expected.json | 5 +- .../harmony/uncategorised/98/expected.json | 5 +- test/fixtures/jsx/basic/11/expected.json | 2 +- test/fixtures/jsx/basic/12/expected.json | 2 +- test/fixtures/jsx/basic/13/expected.json | 8 +- test/fixtures/jsx/basic/18/expected.json | 2 +- test/fixtures/jsx/basic/19/expected.json | 4 +- test/fixtures/jsx/basic/3/expected.json | 6 +- test/fixtures/jsx/basic/4/expected.json | 8 +- test/fixtures/jsx/basic/7/expected.json | 4 +- .../jsx/basic/keyword-tag/expected.json | 128 ++++++++ .../jsx/basic/namespace-tag/expected.json | 286 ++++++++++++++++++ test/fixtures/jsx/regression/1/expected.json | 8 +- test/fixtures/jsx/regression/4/expected.json | 2 +- test/fixtures/jsx/regression/6/expected.json | 2 +- test/fixtures/jsx/regression/7/expected.json | 2 +- .../jsx/regression/issue-2083/expected.json | 2 +- .../jsx/regression/issue-2114/expected.json | 2 +- 535 files changed, 3124 insertions(+), 1005 deletions(-) create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-getter-literal-identifier/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-literal/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-identifier/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literals/expected.json create mode 100644 test/fixtures/esprima/es2015-object-initialiser/invalid-proto-setter-literal-identifier/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0035/expected.json create mode 100644 test/fixtures/harmony/uncategorised/343/expected.json create mode 100644 test/fixtures/harmony/uncategorised/349/expected.json create mode 100644 test/fixtures/jsx/basic/keyword-tag/expected.json create mode 100644 test/fixtures/jsx/basic/namespace-tag/expected.json diff --git a/src/parser/expression.js b/src/parser/expression.js index 9bd456fd1a..96ce489e71 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -32,9 +32,17 @@ pp.checkPropClash = function (prop, propHash) { let key = prop.key, 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; @@ -377,19 +385,28 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { 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); + this.next(); + return this.finishNode(node, "NullLiteral"); + + case tt._true: case tt._false: + node = this.startNode(); + node.rawValue = node.value = this.match(tt._true); node.raw = this.state.type.keyword; this.next(); - return this.finishNode(node, "Literal"); + return this.finishNode(node, "BooleanLiteral"); case tt.parenL: return this.parseParenAndDistinguishExpression(null, null, canBeArrow); @@ -443,12 +460,12 @@ 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.next(); - return this.finishNode(node, "Literal"); + return this.finishNode(node, type); }; pp.parseParenExpression = function () { diff --git a/src/parser/statement.js b/src/parser/statement.js index 9f5457f9c4..1d8ea87793 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -565,7 +565,7 @@ pp.parseClass = function (node, isStatement, optionalId) { key = this.parsePropertyName(method); } if (!method.static && (key.type === "Identifier" && key.name === "constructor" || - key.type === "Literal" && key.value === "constructor")) { + key.type === "StringLiteral" && key.value === "constructor")) { 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"); diff --git a/src/parser/util.js b/src/parser/util.js index 784daad310..29cdc074c6 100644 --- a/src/parser/util.js +++ b/src/parser/util.js @@ -9,7 +9,7 @@ const pp = Parser.prototype; // Test whether a statement node is the string literal `"use strict"`. pp.isUseStrict = function (stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict"; + return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && stmt.expression.raw.slice(1, -1) === "use strict"; }; // TODO diff --git a/src/plugins/jsx/index.js b/src/plugins/jsx/index.js index f573fff9e9..b6ae663bee 100644 --- a/src/plugins/jsx/index.js +++ b/src/plugins/jsx/index.js @@ -382,7 +382,7 @@ export default function(instance) { instance.extend("parseExprAtom", function(inner) { return function(refShortHandDefaultPos) { if (this.match(tt.jsxText)) { - var node = this.parseLiteral(this.state.value); + var node = this.parseLiteral(this.state.value, "JSXText"); // https://github.com/babel/babel/issues/2078 node.rawValue = null; return node; diff --git a/test/fixtures/comments/basic/surrounding-throw-comments/expected.json b/test/fixtures/comments/basic/surrounding-throw-comments/expected.json index 1d43e1eea5..41527785fb 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": { 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..9d9f17495b 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": { 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..1258711857 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": { @@ -267,7 +267,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 111, "end": 112, "loc": { diff --git a/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json b/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json index 7bd86859b4..73e33512ba 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": { @@ -202,7 +202,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 71, "end": 72, "loc": { 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..24a358f0e2 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": { @@ -210,7 +210,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 83, "end": 84, "loc": { 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..c3f7926916 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": { @@ -527,7 +527,7 @@ } ], "test": { - "type": "Literal", + "type": "StringLiteral", "start": 116, "end": 136, "loc": { @@ -584,7 +584,7 @@ } }, "argument": { - "type": "Literal", + "type": "BooleanLiteral", "start": 271, "end": 276, "loc": { 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..79727f2aa4 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": { diff --git a/test/fixtures/core/categorized/regex-after-block/expected.json b/test/fixtures/core/categorized/regex-after-block/expected.json index 9865ab3100..9abc79800a 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": { @@ -93,7 +93,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 15, "end": 20, "loc": { @@ -107,10 +107,8 @@ } }, "raw": "/foo/", - "regex": { - "pattern": "foo", - "flags": "" - } + "pattern": "foo", + "flags": "" } } ] diff --git a/test/fixtures/core/uncategorised/10/expected.json b/test/fixtures/core/uncategorised/10/expected.json index 61f7bde252..da404948f1 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": { diff --git a/test/fixtures/core/uncategorised/100/expected.json b/test/fixtures/core/uncategorised/100/expected.json index aaafd737c7..4b7d0df83e 100644 --- a/test/fixtures/core/uncategorised/100/expected.json +++ b/test/fixtures/core/uncategorised/100/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/101/expected.json b/test/fixtures/core/uncategorised/101/expected.json index bea6bba9b2..5255b7b53d 100644 --- a/test/fixtures/core/uncategorised/101/expected.json +++ b/test/fixtures/core/uncategorised/101/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/102/expected.json b/test/fixtures/core/uncategorised/102/expected.json index 009a9e4ed5..6146d006c2 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": { @@ -88,10 +88,8 @@ } }, "raw": "/[a-z]/i", - "regex": { - "pattern": "[a-z]", - "flags": "i" - } + "pattern": "[a-z]", + "flags": "i" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ 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..e5403147fe 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": { @@ -88,10 +88,8 @@ } }, "raw": "/[x-z]/i", - "regex": { - "pattern": "[x-z]", - "flags": "i" - } + "pattern": "[x-z]", + "flags": "i" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ 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..f998864e01 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": { @@ -88,10 +88,8 @@ } }, "raw": "/[a-c]/i", - "regex": { - "pattern": "[a-c]", - "flags": "i" - } + "pattern": "[a-c]", + "flags": "i" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ 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..4119341722 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": { @@ -88,10 +88,8 @@ } }, "raw": "/[P QR]/i", - "regex": { - "pattern": "[P QR]", - "flags": "i" - } + "pattern": "[P QR]", + "flags": "i" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ 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..323385e36b 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": { @@ -88,10 +88,8 @@ } }, "raw": "/foo\\/bar/", - "regex": { - "pattern": "foo\\/bar", - "flags": "" - } + "pattern": "foo\\/bar", + "flags": "" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ 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..b973814034 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": { @@ -88,10 +88,8 @@ } }, "raw": "/=([^=\\s])+/g", - "regex": { - "pattern": "=([^=\\s])+", - "flags": "g" - } + "pattern": "=([^=\\s])+", + "flags": "g" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ 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..533ad1b064 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": { @@ -88,10 +88,8 @@ } }, "raw": "/[P QR]/\\u0067", - "regex": { - "pattern": "[P QR]", - "flags": "g" - } + "pattern": "[P QR]", + "flags": "g" } } ], @@ -99,4 +97,4 @@ } ] } -} +} \ 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..e011780af1 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": { diff --git a/test/fixtures/core/uncategorised/12/expected.json b/test/fixtures/core/uncategorised/12/expected.json index e41172db76..90a2413a90 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": { @@ -107,7 +107,7 @@ "raw": "1" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -125,7 +125,7 @@ "raw": "2" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/core/uncategorised/124/expected.json b/test/fixtures/core/uncategorised/124/expected.json index cca9b0fc82..f26ab8b935 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": { diff --git a/test/fixtures/core/uncategorised/125/expected.json b/test/fixtures/core/uncategorised/125/expected.json index 463a77c2e5..624c7b81b9 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": { diff --git a/test/fixtures/core/uncategorised/126/expected.json b/test/fixtures/core/uncategorised/126/expected.json index fab1521321..23d090fedc 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": { @@ -155,7 +155,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 22, "end": 24, "loc": { @@ -173,7 +173,7 @@ "raw": "14" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 26, "end": 27, "loc": { @@ -191,7 +191,7 @@ "raw": "3" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 29, "end": 31, "loc": { diff --git a/test/fixtures/core/uncategorised/127/expected.json b/test/fixtures/core/uncategorised/127/expected.json index 762a4f980c..080068549b 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": { diff --git a/test/fixtures/core/uncategorised/13/expected.json b/test/fixtures/core/uncategorised/13/expected.json index df8bef639b..9bc040d735 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": { @@ -107,7 +107,7 @@ "raw": "1" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -126,7 +126,7 @@ }, null, { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/197/expected.json b/test/fixtures/core/uncategorised/197/expected.json index 355a73a1ad..9252297ac7 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": { @@ -91,7 +91,7 @@ "raw": "1" }, "alternate": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/core/uncategorised/198/expected.json b/test/fixtures/core/uncategorised/198/expected.json index 618615ef5f..6d0cf5e9ff 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": { @@ -123,7 +123,7 @@ "raw": "1" }, "alternate": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/199/expected.json b/test/fixtures/core/uncategorised/199/expected.json index dcfe85d992..886a4c91ba 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": { 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..087953e749 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": { diff --git a/test/fixtures/core/uncategorised/201/expected.json b/test/fixtures/core/uncategorised/201/expected.json index aadc603158..c40cefe77a 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": { diff --git a/test/fixtures/core/uncategorised/202/expected.json b/test/fixtures/core/uncategorised/202/expected.json index c68b13b4a8..77c0b3f6fd 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": { diff --git a/test/fixtures/core/uncategorised/203/expected.json b/test/fixtures/core/uncategorised/203/expected.json index 2a2e320c76..3ea5616140 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": { diff --git a/test/fixtures/core/uncategorised/204/expected.json b/test/fixtures/core/uncategorised/204/expected.json index f61cd91960..3bb965131c 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": { diff --git a/test/fixtures/core/uncategorised/205/expected.json b/test/fixtures/core/uncategorised/205/expected.json index d87bd7221e..623bec2d65 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": { diff --git a/test/fixtures/core/uncategorised/206/expected.json b/test/fixtures/core/uncategorised/206/expected.json index 58ac4f76d5..169b55b357 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": { diff --git a/test/fixtures/core/uncategorised/207/expected.json b/test/fixtures/core/uncategorised/207/expected.json index 6aec1fd6ae..395bbc5959 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": { diff --git a/test/fixtures/core/uncategorised/208/expected.json b/test/fixtures/core/uncategorised/208/expected.json index 2afa7f1ab0..f2baaf2d7c 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": { diff --git a/test/fixtures/core/uncategorised/209/expected.json b/test/fixtures/core/uncategorised/209/expected.json index 34ae7fde25..63767ff44b 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": { diff --git a/test/fixtures/core/uncategorised/210/expected.json b/test/fixtures/core/uncategorised/210/expected.json index a97d4cb79e..22bf53cf58 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": { diff --git a/test/fixtures/core/uncategorised/211/expected.json b/test/fixtures/core/uncategorised/211/expected.json index 7a092cae1b..52cfe31685 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": { diff --git a/test/fixtures/core/uncategorised/212/expected.json b/test/fixtures/core/uncategorised/212/expected.json index 0c297787a4..0cb0e23497 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": { diff --git a/test/fixtures/core/uncategorised/218/expected.json b/test/fixtures/core/uncategorised/218/expected.json index a5b0f49382..746c634e18 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": { diff --git a/test/fixtures/core/uncategorised/219/expected.json b/test/fixtures/core/uncategorised/219/expected.json index 6ed6cc90fa..e88bd0e0af 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": { @@ -123,7 +123,7 @@ "name": "arguments" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 27, "end": 29, "loc": { diff --git a/test/fixtures/core/uncategorised/22/expected.json b/test/fixtures/core/uncategorised/22/expected.json index e737e4bf96..6798856802 100644 --- a/test/fixtures/core/uncategorised/22/expected.json +++ b/test/fixtures/core/uncategorised/22/expected.json @@ -122,7 +122,7 @@ "name": "answer" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/220/expected.json b/test/fixtures/core/uncategorised/220/expected.json index 6b9e9e3f3a..f0f1cc157c 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": { @@ -123,7 +123,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { @@ -172,7 +172,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 27, "loc": { diff --git a/test/fixtures/core/uncategorised/23/expected.json b/test/fixtures/core/uncategorised/23/expected.json index b7e5bc565e..7d1d29919f 100644 --- a/test/fixtures/core/uncategorised/23/expected.json +++ b/test/fixtures/core/uncategorised/23/expected.json @@ -122,7 +122,7 @@ "name": "if" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/230/expected.json b/test/fixtures/core/uncategorised/230/expected.json index c1930814e6..086e802703 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": { diff --git a/test/fixtures/core/uncategorised/232/expected.json b/test/fixtures/core/uncategorised/232/expected.json index a065c54055..298c6ed2b8 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": { diff --git a/test/fixtures/core/uncategorised/233/expected.json b/test/fixtures/core/uncategorised/233/expected.json index bcc441a257..cf9db0e4fd 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": { diff --git a/test/fixtures/core/uncategorised/234/expected.json b/test/fixtures/core/uncategorised/234/expected.json index 09c2e86050..3bd687b08d 100644 --- a/test/fixtures/core/uncategorised/234/expected.json +++ b/test/fixtures/core/uncategorised/234/expected.json @@ -187,7 +187,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 28, "end": 30, "loc": { diff --git a/test/fixtures/core/uncategorised/235/expected.json b/test/fixtures/core/uncategorised/235/expected.json index 2333bd0d07..5f92a264ce 100644 --- a/test/fixtures/core/uncategorised/235/expected.json +++ b/test/fixtures/core/uncategorised/235/expected.json @@ -74,7 +74,7 @@ "body": [] }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 16, "end": 21, "loc": { @@ -107,7 +107,7 @@ } }, "expression": { - "type": "Literal", + "type": "BooleanLiteral", "start": 23, "end": 28, "loc": { diff --git a/test/fixtures/core/uncategorised/236/expected.json b/test/fixtures/core/uncategorised/236/expected.json index e3ddda1e17..b68c4e6106 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": { diff --git a/test/fixtures/core/uncategorised/237/expected.json b/test/fixtures/core/uncategorised/237/expected.json index bf0cf79afd..c7381370ab 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": { diff --git a/test/fixtures/core/uncategorised/24/expected.json b/test/fixtures/core/uncategorised/24/expected.json index 91bb601500..80a4774e20 100644 --- a/test/fixtures/core/uncategorised/24/expected.json +++ b/test/fixtures/core/uncategorised/24/expected.json @@ -122,7 +122,7 @@ "name": "true" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/240/expected.json b/test/fixtures/core/uncategorised/240/expected.json index 0221127370..f45ca7088d 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": { diff --git a/test/fixtures/core/uncategorised/241/expected.json b/test/fixtures/core/uncategorised/241/expected.json index 46c4e44c8f..6640f73295 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": { diff --git a/test/fixtures/core/uncategorised/242/expected.json b/test/fixtures/core/uncategorised/242/expected.json index 20b89977b6..61391fdd9f 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": { @@ -137,7 +137,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/core/uncategorised/243/expected.json b/test/fixtures/core/uncategorised/243/expected.json index 66dff360f5..fb76721dce 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": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/244/expected.json b/test/fixtures/core/uncategorised/244/expected.json index 1943c72a2e..f826f885de 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": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/245/expected.json b/test/fixtures/core/uncategorised/245/expected.json index ea41666efe..16f684a226 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": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/25/expected.json b/test/fixtures/core/uncategorised/25/expected.json index bf78e60abe..a6a31f5362 100644 --- a/test/fixtures/core/uncategorised/25/expected.json +++ b/test/fixtures/core/uncategorised/25/expected.json @@ -122,7 +122,7 @@ "name": "false" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 15, "loc": { diff --git a/test/fixtures/core/uncategorised/250/expected.json b/test/fixtures/core/uncategorised/250/expected.json index 9ea0854331..40763456b0 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": { diff --git a/test/fixtures/core/uncategorised/251/expected.json b/test/fixtures/core/uncategorised/251/expected.json index 3cadc13b16..bfea074cf1 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": { diff --git a/test/fixtures/core/uncategorised/252/expected.json b/test/fixtures/core/uncategorised/252/expected.json index 661b7b9d0a..f43031468c 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": { diff --git a/test/fixtures/core/uncategorised/253/expected.json b/test/fixtures/core/uncategorised/253/expected.json index 3c06ab2a96..3b684f46cb 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": { diff --git a/test/fixtures/core/uncategorised/254/expected.json b/test/fixtures/core/uncategorised/254/expected.json index 1d9fe4c071..15042df691 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": { diff --git a/test/fixtures/core/uncategorised/255/expected.json b/test/fixtures/core/uncategorised/255/expected.json index de1ad554fa..be48009734 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": { diff --git a/test/fixtures/core/uncategorised/256/expected.json b/test/fixtures/core/uncategorised/256/expected.json index 62a3160e6e..6c31c586d6 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": { diff --git a/test/fixtures/core/uncategorised/26/expected.json b/test/fixtures/core/uncategorised/26/expected.json index 4a45b6dd41..e516e972e9 100644 --- a/test/fixtures/core/uncategorised/26/expected.json +++ b/test/fixtures/core/uncategorised/26/expected.json @@ -122,7 +122,7 @@ "name": "null" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/269/expected.json b/test/fixtures/core/uncategorised/269/expected.json index 62e79f338e..9758d61707 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": { diff --git a/test/fixtures/core/uncategorised/27/expected.json b/test/fixtures/core/uncategorised/27/expected.json index 8f6fb8980a..96a8fd0d09 100644 --- a/test/fixtures/core/uncategorised/27/expected.json +++ b/test/fixtures/core/uncategorised/27/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 6, "end": 14, "loc": { @@ -124,7 +124,7 @@ "raw": "\"answer\"" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 18, "loc": { diff --git a/test/fixtures/core/uncategorised/270/expected.json b/test/fixtures/core/uncategorised/270/expected.json index b29ad0f66d..7400509d5f 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": { diff --git a/test/fixtures/core/uncategorised/272/expected.json b/test/fixtures/core/uncategorised/272/expected.json index cddf16fc26..c4f9e0e386 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": { diff --git a/test/fixtures/core/uncategorised/275/expected.json b/test/fixtures/core/uncategorised/275/expected.json index fe437eefa7..dc9afaed76 100644 --- a/test/fixtures/core/uncategorised/275/expected.json +++ b/test/fixtures/core/uncategorised/275/expected.json @@ -91,7 +91,7 @@ "name": "message" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 24, "loc": { diff --git a/test/fixtures/core/uncategorised/28/expected.json b/test/fixtures/core/uncategorised/28/expected.json index 4a5cc05f3d..d754d81e2b 100644 --- a/test/fixtures/core/uncategorised/28/expected.json +++ b/test/fixtures/core/uncategorised/28/expected.json @@ -122,7 +122,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -175,7 +175,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/289/expected.json b/test/fixtures/core/uncategorised/289/expected.json index c1db4cf35a..f5013969f2 100644 --- a/test/fixtures/core/uncategorised/289/expected.json +++ b/test/fixtures/core/uncategorised/289/expected.json @@ -139,7 +139,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 37, "end": 49, "loc": { diff --git a/test/fixtures/core/uncategorised/3/expected.json b/test/fixtures/core/uncategorised/3/expected.json index c05561829f..778ef2fe98 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": { diff --git a/test/fixtures/core/uncategorised/303/expected.json b/test/fixtures/core/uncategorised/303/expected.json index 54b06ec57a..b3c4b6a133 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": { @@ -138,7 +138,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { diff --git a/test/fixtures/core/uncategorised/304/expected.json b/test/fixtures/core/uncategorised/304/expected.json index 417879a077..253be28d97 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": { diff --git a/test/fixtures/core/uncategorised/305/expected.json b/test/fixtures/core/uncategorised/305/expected.json index 85d1c9cc9b..567f02ad8f 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": { @@ -172,5 +172,27 @@ } } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " Comment", + "start": 24, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "range": [ + 24, + 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..b094efe11f 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": { @@ -172,5 +172,27 @@ } } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": " Multiline\nComment ", + "start": 24, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "range": [ + 24, + 47 + ] + } + ] } \ 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..be91d94441 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": { diff --git a/test/fixtures/core/uncategorised/308/expected.json b/test/fixtures/core/uncategorised/308/expected.json index 16b5f8de23..2fc3f311ee 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": { @@ -172,5 +172,27 @@ } } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " Comment", + "start": 21, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "range": [ + 21, + 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..6720b43723 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": { @@ -172,5 +172,27 @@ } } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": " Multiline\nComment ", + "start": 21, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "range": [ + 21, + 44 + ] + } + ] } \ 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..77f0623dd0 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": { diff --git a/test/fixtures/core/uncategorised/318/expected.json b/test/fixtures/core/uncategorised/318/expected.json index 1af7d36137..a9f877830b 100644 --- a/test/fixtures/core/uncategorised/318/expected.json +++ b/test/fixtures/core/uncategorised/318/expected.json @@ -104,7 +104,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 16, "end": 28, "loc": { @@ -137,7 +137,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 31, "end": 34, "loc": { diff --git a/test/fixtures/core/uncategorised/319/expected.json b/test/fixtures/core/uncategorised/319/expected.json index 7bfda37783..c8465306e7 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": { @@ -108,7 +108,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/320/expected.json b/test/fixtures/core/uncategorised/320/expected.json index d18528b0b3..dfcf159a6b 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": { @@ -76,7 +76,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { diff --git a/test/fixtures/core/uncategorised/322/expected.json b/test/fixtures/core/uncategorised/322/expected.json index 4bb48ca6a4..312ab26090 100644 --- a/test/fixtures/core/uncategorised/322/expected.json +++ b/test/fixtures/core/uncategorised/322/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 10, "loc": { diff --git a/test/fixtures/core/uncategorised/323/expected.json b/test/fixtures/core/uncategorised/323/expected.json index ed6fd4e376..a3669a1658 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": { @@ -121,7 +121,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/324/expected.json b/test/fixtures/core/uncategorised/324/expected.json index e28711fe0b..5409838244 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": { @@ -75,7 +75,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 5, "end": 12, "loc": { @@ -89,14 +89,12 @@ } }, "raw": "/ foo/", - "regex": { - "pattern": " foo", - "flags": "" - } + "pattern": " foo", + "flags": "" } }, "alternate": null } ] } -} +} \ 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..599c268bdf 100644 --- a/test/fixtures/core/uncategorised/341/expected.json +++ b/test/fixtures/core/uncategorised/341/expected.json @@ -59,7 +59,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 2, "end": 5, "loc": { @@ -73,12 +73,10 @@ } }, "raw": "/=/", - "regex": { - "pattern": "=", - "flags": "" - } + "pattern": "=", + "flags": "" } } ] } -} +} \ 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..16ef7df684 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": { @@ -165,5 +165,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " nothing", + "start": 13, + "end": 24, + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "range": [ + 13, + 24 + ] + } + ] } \ 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..c8acee55d3 100644 --- a/test/fixtures/core/uncategorised/344/expected.json +++ b/test/fixtures/core/uncategorised/344/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/35/expected.json b/test/fixtures/core/uncategorised/35/expected.json index d8f2ba1cf2..929aaebf51 100644 --- a/test/fixtures/core/uncategorised/35/expected.json +++ b/test/fixtures/core/uncategorised/35/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 10, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/36/expected.json b/test/fixtures/core/uncategorised/36/expected.json index a9d4864fed..2249562b63 100644 --- a/test/fixtures/core/uncategorised/36/expected.json +++ b/test/fixtures/core/uncategorised/36/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/4/expected.json b/test/fixtures/core/uncategorised/4/expected.json index 9c29ccb629..cfa64792cf 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": { @@ -57,12 +57,10 @@ } }, "raw": "/foobar/", - "regex": { - "pattern": "foobar", - "flags": "" - } + "pattern": "foobar", + "flags": "" } } ] } -} +} \ 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..e1c3ca9d7e 100644 --- a/test/fixtures/core/uncategorised/42/expected.json +++ b/test/fixtures/core/uncategorised/42/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 10, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/43/expected.json b/test/fixtures/core/uncategorised/43/expected.json index ae9c51390d..831c152d07 100644 --- a/test/fixtures/core/uncategorised/43/expected.json +++ b/test/fixtures/core/uncategorised/43/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/44/expected.json b/test/fixtures/core/uncategorised/44/expected.json index fa0228a80c..22361a57aa 100644 --- a/test/fixtures/core/uncategorised/44/expected.json +++ b/test/fixtures/core/uncategorised/44/expected.json @@ -122,7 +122,7 @@ "name": "get" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { diff --git a/test/fixtures/core/uncategorised/45/expected.json b/test/fixtures/core/uncategorised/45/expected.json index 360cc1183c..96f2955db3 100644 --- a/test/fixtures/core/uncategorised/45/expected.json +++ b/test/fixtures/core/uncategorised/45/expected.json @@ -122,7 +122,7 @@ "name": "set" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { diff --git a/test/fixtures/core/uncategorised/46/expected.json b/test/fixtures/core/uncategorised/46/expected.json index 70440e8cff..dd2e0291b4 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": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": " block comment ", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "range": [ + 0, + 19 + ] + } + ] } \ 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..850a6eaa47 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": { @@ -106,5 +106,47 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "The", + "start": 3, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "range": [ + 3, + 10 + ] + }, + { + "type": "CommentBlock", + "value": "Answer", + "start": 11, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "range": [ + 11, + 21 + ] + } + ] } \ 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..128dc0844c 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": { @@ -106,5 +106,47 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "the", + "start": 3, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "range": [ + 3, + 10 + ] + }, + { + "type": "CommentBlock", + "value": "answer", + "start": 11, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "range": [ + 11, + 21 + ] + } + ] } \ 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..f60e121523 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": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": " multiline\ncomment\nshould\nbe\nignored ", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 10 + } + }, + "range": [ + 0, + 41 + ] + } + ] } \ 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..00b6bbab99 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": { @@ -57,12 +57,10 @@ } }, "raw": "/[a-z]/g", - "regex": { - "pattern": "[a-z]", - "flags": "g" - } + "pattern": "[a-z]", + "flags": "g" } } ] } -} +} \ 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..1941345514 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": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "a\nb", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "range": [ + 0, + 7 + ] + } + ] } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/51/expected.json b/test/fixtures/core/uncategorised/51/expected.json index 5028451839..a6794f44ff 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": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "a\rb", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "range": [ + 0, + 7 + ] + } + ] } \ 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..1941345514 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": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "a\nb", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "range": [ + 0, + 7 + ] + } + ] } \ 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..966e0d2d6f 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": { diff --git a/test/fixtures/core/uncategorised/528/expected.json b/test/fixtures/core/uncategorised/528/expected.json index 769f0e0bf2..fc6d35a712 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": { @@ -123,7 +123,7 @@ "name": "arguments" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 27, "end": 29, "loc": { diff --git a/test/fixtures/core/uncategorised/529/expected.json b/test/fixtures/core/uncategorised/529/expected.json index 72a0f70422..bd5767e5df 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": { @@ -123,7 +123,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { @@ -172,7 +172,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 27, "loc": { diff --git a/test/fixtures/core/uncategorised/53/expected.json b/test/fixtures/core/uncategorised/53/expected.json index 87e3d95851..3b798c3d36 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": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "a\nc", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "range": [ + 0, + 7 + ] + } + ] } \ 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..e10d00d731 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": { diff --git a/test/fixtures/core/uncategorised/531/expected.json b/test/fixtures/core/uncategorised/531/expected.json index e7d044a4ed..3d38c67b22 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": { @@ -137,7 +137,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/core/uncategorised/533/expected.json b/test/fixtures/core/uncategorised/533/expected.json index 7a3105b73c..dcf8a26650 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": { diff --git a/test/fixtures/core/uncategorised/534/expected.json b/test/fixtures/core/uncategorised/534/expected.json index 6fe8322ba5..3a6addea10 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": { @@ -123,7 +123,7 @@ "name": "arguments" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 29, "end": 31, "loc": { diff --git a/test/fixtures/core/uncategorised/535/expected.json b/test/fixtures/core/uncategorised/535/expected.json index 8a1741ec4b..15ba33cd4d 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": { @@ -123,7 +123,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { @@ -172,7 +172,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 25, "end": 29, "loc": { diff --git a/test/fixtures/core/uncategorised/537/expected.json b/test/fixtures/core/uncategorised/537/expected.json index 7a71d52992..50fd4d6345 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": { @@ -128,6 +128,5 @@ } } ] - }, - "comments": [] + } } \ 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..526710b150 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": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " line comment", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "range": [ + 0, + 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..3b9f0e4448 100644 --- a/test/fixtures/core/uncategorised/540/expected.json +++ b/test/fixtures/core/uncategorised/540/expected.json @@ -93,7 +93,7 @@ }, "operator": "/", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { diff --git a/test/fixtures/core/uncategorised/541/expected.json b/test/fixtures/core/uncategorised/541/expected.json index ece4393a86..93d8cd375b 100644 --- a/test/fixtures/core/uncategorised/541/expected.json +++ b/test/fixtures/core/uncategorised/541/expected.json @@ -93,7 +93,7 @@ } }, "expression": { - "type": "Literal", + "type": "RegexLiteral", "start": 16, "end": 21, "loc": { @@ -107,12 +107,10 @@ } }, "raw": "/ 1 /", - "regex": { - "pattern": " 1 ", - "flags": "" - } + "pattern": " 1 ", + "flags": "" } } ] } -} +} \ 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..b400dbe706 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": { @@ -86,5 +86,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " line comment", + "start": 3, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "range": [ + 3, + 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..337ed51862 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": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " Hello, world!", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "range": [ + 0, + 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..4ab335adab 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": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": "", + "start": 0, + "end": 2, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + }, + "range": [ + 0, + 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..deaf7c1729 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": { @@ -90,7 +90,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { @@ -111,7 +111,7 @@ }, "operator": "*", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { diff --git a/test/fixtures/core/uncategorised/62/expected.json b/test/fixtures/core/uncategorised/62/expected.json index b8e255f5e1..3b0389e5d0 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": { @@ -85,5 +85,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "range": [ + 0, + 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..291f749462 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": { @@ -105,5 +105,47 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentLine", + "value": " Hello, world!", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "range": [ + 0, + 16 + ] + }, + { + "type": "CommentLine", + "value": " Another hello", + "start": 18, + "end": 36, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 18 + } + }, + "range": [ + 18, + 36 + ] + } + ] } \ 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..2d16fc17b9 100644 --- a/test/fixtures/core/uncategorised/65/expected.json +++ b/test/fixtures/core/uncategorised/65/expected.json @@ -147,7 +147,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { @@ -168,5 +168,27 @@ ] } ] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": " perfect ", + "start": 27, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "range": [ + 27, + 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..ee7c3c8a44 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": { diff --git a/test/fixtures/core/uncategorised/67/expected.json b/test/fixtures/core/uncategorised/67/expected.json index b5ce31672a..4e90f25295 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": { diff --git a/test/fixtures/core/uncategorised/68/expected.json b/test/fixtures/core/uncategorised/68/expected.json index 8197c99729..5c479ec64e 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": { diff --git a/test/fixtures/core/uncategorised/69/expected.json b/test/fixtures/core/uncategorised/69/expected.json index c9032e42b5..674c028642 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": { diff --git a/test/fixtures/core/uncategorised/70/expected.json b/test/fixtures/core/uncategorised/70/expected.json index 16bb765432..d8fd4c0959 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": { diff --git a/test/fixtures/core/uncategorised/71/expected.json b/test/fixtures/core/uncategorised/71/expected.json index 77caa9f92d..c65f80bc71 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": { diff --git a/test/fixtures/core/uncategorised/72/expected.json b/test/fixtures/core/uncategorised/72/expected.json index 0e80f889c4..6c9bd55f71 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": { diff --git a/test/fixtures/core/uncategorised/73/expected.json b/test/fixtures/core/uncategorised/73/expected.json index a4929925aa..8aa93e63cc 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": { diff --git a/test/fixtures/core/uncategorised/74/expected.json b/test/fixtures/core/uncategorised/74/expected.json index 80d8d72652..532733a4dd 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": { diff --git a/test/fixtures/core/uncategorised/75/expected.json b/test/fixtures/core/uncategorised/75/expected.json index 9fbcefb6e6..58b2f24c7a 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": { diff --git a/test/fixtures/core/uncategorised/76/expected.json b/test/fixtures/core/uncategorised/76/expected.json index 76c1f1c523..ceaa8c3a17 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": { diff --git a/test/fixtures/core/uncategorised/77/expected.json b/test/fixtures/core/uncategorised/77/expected.json index 0039bb62d0..f80d7c9cd5 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": { diff --git a/test/fixtures/core/uncategorised/78/expected.json b/test/fixtures/core/uncategorised/78/expected.json index 34f104d94a..75950798ba 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": { diff --git a/test/fixtures/core/uncategorised/79/expected.json b/test/fixtures/core/uncategorised/79/expected.json index 60fe7b9e32..3ec2521ed5 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": { diff --git a/test/fixtures/core/uncategorised/80/expected.json b/test/fixtures/core/uncategorised/80/expected.json index 656eba441e..c9510f36fa 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": { diff --git a/test/fixtures/core/uncategorised/81/expected.json b/test/fixtures/core/uncategorised/81/expected.json index 0f25cbbe5a..dd38ee8475 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": { diff --git a/test/fixtures/core/uncategorised/82/expected.json b/test/fixtures/core/uncategorised/82/expected.json index a3d0753826..e4985f2b1e 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": { diff --git a/test/fixtures/core/uncategorised/83/expected.json b/test/fixtures/core/uncategorised/83/expected.json index 775be2d87f..8bb1dbdaf8 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": { diff --git a/test/fixtures/core/uncategorised/84/expected.json b/test/fixtures/core/uncategorised/84/expected.json index 3d5cb353e0..74b4910c7c 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": { diff --git a/test/fixtures/core/uncategorised/85/expected.json b/test/fixtures/core/uncategorised/85/expected.json index 8404808409..75243c6d6a 100644 --- a/test/fixtures/core/uncategorised/85/expected.json +++ b/test/fixtures/core/uncategorised/85/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 7, "loc": { diff --git a/test/fixtures/core/uncategorised/86/expected.json b/test/fixtures/core/uncategorised/86/expected.json index dcc47b071b..db9d18218f 100644 --- a/test/fixtures/core/uncategorised/86/expected.json +++ b/test/fixtures/core/uncategorised/86/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 22, "loc": { diff --git a/test/fixtures/core/uncategorised/87/expected.json b/test/fixtures/core/uncategorised/87/expected.json index 6fe6d8067b..21ac4d0633 100644 --- a/test/fixtures/core/uncategorised/87/expected.json +++ b/test/fixtures/core/uncategorised/87/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 8, "loc": { diff --git a/test/fixtures/core/uncategorised/88/expected.json b/test/fixtures/core/uncategorised/88/expected.json index 6dd6810aa8..d98bbbf345 100644 --- a/test/fixtures/core/uncategorised/88/expected.json +++ b/test/fixtures/core/uncategorised/88/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 6, "loc": { diff --git a/test/fixtures/core/uncategorised/89/expected.json b/test/fixtures/core/uncategorised/89/expected.json index 9cfa9faad2..fb56f80c47 100644 --- a/test/fixtures/core/uncategorised/89/expected.json +++ b/test/fixtures/core/uncategorised/89/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/9/expected.json b/test/fixtures/core/uncategorised/9/expected.json index 6cae01b125..bd8886934c 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": { diff --git a/test/fixtures/core/uncategorised/90/expected.json b/test/fixtures/core/uncategorised/90/expected.json index aaafd737c7..4b7d0df83e 100644 --- a/test/fixtures/core/uncategorised/90/expected.json +++ b/test/fixtures/core/uncategorised/90/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/core/uncategorised/91/expected.json b/test/fixtures/core/uncategorised/91/expected.json index 2e79d5b096..7f2af71438 100644 --- a/test/fixtures/core/uncategorised/91/expected.json +++ b/test/fixtures/core/uncategorised/91/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 15, "loc": { diff --git a/test/fixtures/core/uncategorised/92/expected.json b/test/fixtures/core/uncategorised/92/expected.json index d25c9ba139..36c8089dfa 100644 --- a/test/fixtures/core/uncategorised/92/expected.json +++ b/test/fixtures/core/uncategorised/92/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/93/expected.json b/test/fixtures/core/uncategorised/93/expected.json index 806ba7acba..73355963c0 100644 --- a/test/fixtures/core/uncategorised/93/expected.json +++ b/test/fixtures/core/uncategorised/93/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/94/expected.json b/test/fixtures/core/uncategorised/94/expected.json index 5b15026354..7fa2454d0e 100644 --- a/test/fixtures/core/uncategorised/94/expected.json +++ b/test/fixtures/core/uncategorised/94/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 17, "loc": { diff --git a/test/fixtures/core/uncategorised/95/expected.json b/test/fixtures/core/uncategorised/95/expected.json index e624d06929..f76c3f06ba 100644 --- a/test/fixtures/core/uncategorised/95/expected.json +++ b/test/fixtures/core/uncategorised/95/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/96/expected.json b/test/fixtures/core/uncategorised/96/expected.json index bd2f1ea9ac..e3c5d34073 100644 --- a/test/fixtures/core/uncategorised/96/expected.json +++ b/test/fixtures/core/uncategorised/96/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/97/expected.json b/test/fixtures/core/uncategorised/97/expected.json index 4ae045ff0c..313e3477d2 100644 --- a/test/fixtures/core/uncategorised/97/expected.json +++ b/test/fixtures/core/uncategorised/97/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/98/expected.json b/test/fixtures/core/uncategorised/98/expected.json index 9774cae16c..ec00b5c923 100644 --- a/test/fixtures/core/uncategorised/98/expected.json +++ b/test/fixtures/core/uncategorised/98/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 16, "loc": { diff --git a/test/fixtures/core/uncategorised/99/expected.json b/test/fixtures/core/uncategorised/99/expected.json index 09dd15f3b3..bdb5012bd7 100644 --- a/test/fixtures/core/uncategorised/99/expected.json +++ b/test/fixtures/core/uncategorised/99/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 14, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json index 54b06ec57a..b3c4b6a133 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { @@ -138,7 +138,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json index 417879a077..253be28d97 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json index 22f542ddac..567f02ad8f 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json index d4241aabc4..b094efe11f 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json index 6f55ed4658..be91d94441 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json index aaf8f84a1d..2fc3f311ee 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json index cae3efe70d..6720b43723 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/declaration-const/migrated_0000/expected.json b/test/fixtures/esprima/declaration-const/migrated_0000/expected.json index 7a3105b73c..dcf8a26650 100644 --- a/test/fixtures/esprima/declaration-const/migrated_0000/expected.json +++ b/test/fixtures/esprima/declaration-const/migrated_0000/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/esprima/declaration-const/migrated_0001/expected.json b/test/fixtures/esprima/declaration-const/migrated_0001/expected.json index 80198c2546..8b63e6bb33 100644 --- a/test/fixtures/esprima/declaration-const/migrated_0001/expected.json +++ b/test/fixtures/esprima/declaration-const/migrated_0001/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/esprima/declaration-const/migrated_0002/expected.json b/test/fixtures/esprima/declaration-const/migrated_0002/expected.json index 79a7b04629..55718cfc43 100644 --- a/test/fixtures/esprima/declaration-const/migrated_0002/expected.json +++ b/test/fixtures/esprima/declaration-const/migrated_0002/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { @@ -138,7 +138,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 21, "loc": { @@ -187,7 +187,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 27, "end": 31, "loc": { diff --git a/test/fixtures/esprima/declaration-function/empty-param/expected.json b/test/fixtures/esprima/declaration-function/empty-param/expected.json index 546a1c4026..959d6454f7 100644 --- a/test/fixtures/esprima/declaration-function/empty-param/expected.json +++ b/test/fixtures/esprima/declaration-function/empty-param/expected.json @@ -124,7 +124,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 20, "end": 32, "loc": { diff --git a/test/fixtures/esprima/declaration-function/migrated_0005/expected.json b/test/fixtures/esprima/declaration-function/migrated_0005/expected.json index c1db4cf35a..f5013969f2 100644 --- a/test/fixtures/esprima/declaration-function/migrated_0005/expected.json +++ b/test/fixtures/esprima/declaration-function/migrated_0005/expected.json @@ -139,7 +139,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 37, "end": 49, "loc": { diff --git a/test/fixtures/esprima/declaration-function/migrated_0014/expected.json b/test/fixtures/esprima/declaration-function/migrated_0014/expected.json index 72f253f625..13d9c39d33 100644 --- a/test/fixtures/esprima/declaration-function/migrated_0014/expected.json +++ b/test/fixtures/esprima/declaration-function/migrated_0014/expected.json @@ -105,7 +105,7 @@ } }, "left": { - "type": "Literal", + "type": "StringLiteral", "start": 18, "end": 30, "loc": { @@ -124,7 +124,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 33, "end": 35, "loc": { diff --git a/test/fixtures/esprima/declaration-let/migrated_0002/expected.json b/test/fixtures/esprima/declaration-let/migrated_0002/expected.json index 421e69547d..d6c387f1cf 100644 --- a/test/fixtures/esprima/declaration-let/migrated_0002/expected.json +++ b/test/fixtures/esprima/declaration-let/migrated_0002/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { diff --git a/test/fixtures/esprima/declaration-let/migrated_0003/expected.json b/test/fixtures/esprima/declaration-let/migrated_0003/expected.json index 1614fceb4c..4159969a48 100644 --- a/test/fixtures/esprima/declaration-let/migrated_0003/expected.json +++ b/test/fixtures/esprima/declaration-let/migrated_0003/expected.json @@ -89,7 +89,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { @@ -138,7 +138,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { @@ -187,7 +187,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 25, "end": 29, "loc": { diff --git a/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json b/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json index 6fc51fdb6d..c18fa769b5 100644 --- a/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json +++ b/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json @@ -104,7 +104,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 30, "loc": { diff --git a/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json b/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json index 97967a7597..32deb8d4e2 100644 --- a/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json +++ b/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json @@ -104,7 +104,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 28, "loc": { 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 index aac755fdd7..a37dc71384 100644 --- 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 @@ -110,7 +110,7 @@ }, "elements": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { 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 index acb3c68692..3952075405 100644 --- 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 @@ -111,7 +111,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { 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 index bb4d92fc83..c80e27a7c8 100644 --- 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 @@ -126,7 +126,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { 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 index 055970fd64..11686156c6 100644 --- 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 @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { diff --git a/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json index 7c9c32e1c5..3f3f6aa64d 100644 --- a/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json @@ -81,7 +81,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/elision/expected.json b/test/fixtures/esprima/es2015-array-pattern/elision/expected.json index f0c82eec3f..13bbbbceac 100644 --- a/test/fixtures/esprima/es2015-array-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/elision/expected.json @@ -91,7 +91,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { 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 index 536a85d158..2c1b12478e 100644 --- a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json @@ -74,7 +74,7 @@ "elements": [] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/hole/expected.json b/test/fixtures/esprima/es2015-array-pattern/hole/expected.json index 44ee381630..8dfe71997b 100644 --- a/test/fixtures/esprima/es2015-array-pattern/hole/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/hole/expected.json @@ -108,7 +108,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json index 5d80c8dd9c..d06abc7113 100644 --- a/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json @@ -91,7 +91,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json index 0a028a82f1..df31ae2fcd 100644 --- a/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json @@ -249,7 +249,7 @@ "name": "e" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 28, "end": 29, "loc": { @@ -333,7 +333,7 @@ "name": "g" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 37, "end": 38, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/rest/expected.json b/test/fixtures/esprima/es2015-array-pattern/rest/expected.json index 7118bc2683..cb533f681d 100644 --- a/test/fixtures/esprima/es2015-array-pattern/rest/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/rest/expected.json @@ -106,7 +106,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json index 695be41271..c2fa502238 100644 --- a/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json @@ -92,7 +92,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { 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 index b45bc367e9..2726675278 100644 --- 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 @@ -118,7 +118,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 21, "loc": { 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 index da1c0b9799..48546eeb6c 100644 --- a/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json @@ -107,7 +107,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { 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 index d7d0077c3d..982603fb4d 100644 --- a/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json @@ -143,7 +143,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { 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 index 878f8d67a9..6e488ff2b1 100644 --- 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 @@ -125,7 +125,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { 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 index 7528bfa144..79abe75001 100644 --- 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 @@ -93,7 +93,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json index cdf259a636..ed4c1605fe 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json @@ -61,7 +61,7 @@ "expression": true, "params": [], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 6, "end": 12, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json index fd76eb8af9..c3e068731d 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 5, "end": 11, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json index 1b9cab7e5c..dc38971fa7 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 7, "end": 13, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json index 5a88aff7cb..4bdd74c258 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json @@ -94,7 +94,7 @@ } ], "body": { - "type": "Literal", + "type": "StringLiteral", "start": 10, "end": 16, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json index a8c79cf5fc..ebd04a794b 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json @@ -107,7 +107,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json index 616b8e8a5b..7a3afe8bd4 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json @@ -126,7 +126,7 @@ "name": "property" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 20, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json index be00941649..287f532194 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json @@ -121,7 +121,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json index f79a8f0276..9a918edee0 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json @@ -123,7 +123,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json index 7ad095e070..8b3e1161d1 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json @@ -91,7 +91,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 3, "end": 4, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json index c45a0f326b..3351297bbe 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json index 6af42ac3f5..cdb3afb5bc 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 15, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json index 79998f9b16..c40f9bbb31 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json index 09c80c6f1e..95224d5129 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json @@ -94,7 +94,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 15, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json index 7549259432..645860e175 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json @@ -91,7 +91,7 @@ "name": "eval" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -111,7 +111,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json index 6ea224db79..fd39c13ced 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json @@ -107,7 +107,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { @@ -127,7 +127,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 20, "loc": { diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json index 8a76cf1c16..8368737c3f 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json @@ -113,7 +113,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 12, "loc": { 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 index d75e50e145..607cd3e194 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { 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 index 87c4066eaf..23356e76be 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { 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 index 15344e54fd..be3c47afa8 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { 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 index 25eeb9786f..ae57cab25c 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { 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 index d42f8407c2..4937dfc854 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { 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 index 6f8f49f4e1..e6cfe9f05a 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0001/expected.json b/test/fixtures/esprima/es2015-class/migrated_0001/expected.json index 99cd27794e..0f5ada00b1 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0001/expected.json @@ -59,7 +59,7 @@ "name": "A" }, "superClass": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0016/expected.json b/test/fixtures/esprima/es2015-class/migrated_0016/expected.json index 150f14ca4c..0048caa7d4 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0016/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0016/expected.json @@ -104,7 +104,7 @@ "name": "A" }, "superClass": { - "type": "Literal", + "type": "NumberLiteral", "start": 24, "end": 25, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0019/expected.json b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json index 8b28390427..c7f6cadc22 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0019/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json @@ -90,7 +90,7 @@ }, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 9, "end": 22, "loc": { @@ -161,7 +161,7 @@ }, "computed": true, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 28, "end": 41, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0021/expected.json b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json index 0d65fe2441..90ed6197ca 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0021/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json @@ -90,7 +90,7 @@ }, "computed": true, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 28, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0024/expected.json b/test/fixtures/esprima/es2015-class/migrated_0024/expected.json index 897b90b1c4..0805cc723d 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0024/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0024/expected.json @@ -58,7 +58,7 @@ }, "id": null, "superClass": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0025/expected.json b/test/fixtures/esprima/es2015-class/migrated_0025/expected.json index 80a74cd675..6b475a1756 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0025/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0025/expected.json @@ -73,7 +73,7 @@ "name": "A" }, "superClass": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 18, "loc": { 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 index 8b22c0b26b..8f7d2304f4 100644 --- a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json @@ -122,7 +122,7 @@ "name": "y" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 18, "loc": { 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 index 8cbbeeddbb..beb32095e0 100644 --- a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json @@ -92,7 +92,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { 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 index 4f349927b9..133d3320bc 100644 --- a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json @@ -170,7 +170,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 21, "loc": { 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 index 574f634dc3..dcc67edb83 100644 --- 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 @@ -139,7 +139,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { 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 index e56c4d8f57..734b745fab 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json @@ -77,7 +77,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { 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 index 80579906b4..efd854b233 100644 --- 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 @@ -117,7 +117,7 @@ "name": "a" }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -140,7 +140,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { 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 index b274610e61..63881f8131 100644 --- 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 @@ -119,7 +119,7 @@ "name": "b" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { @@ -227,7 +227,7 @@ "name": "a" }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { @@ -269,7 +269,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 24, "loc": { 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 index 335b17c62c..72f41b4fa2 100644 --- 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 @@ -172,7 +172,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 8, "loc": { 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 index 04a63a3079..17e17c57fe 100644 --- 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 @@ -91,7 +91,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { 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 index 71ff2e0702..100e7a3484 100644 --- 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 @@ -74,7 +74,7 @@ "properties": [] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { 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 index 65409260c0..a140649c5e 100644 --- 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 @@ -467,7 +467,7 @@ "name": "b" }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 25, "end": 26, "loc": { @@ -531,7 +531,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 49, "end": 50, "loc": { 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 index 1689a3fe18..17e21344b3 100644 --- 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 @@ -543,7 +543,7 @@ ] }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 82, "end": 83, "loc": { 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 index 3291034455..49034362d5 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json @@ -90,7 +90,7 @@ "name": "foo" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { 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 index 81384a8a1d..79dccfed7b 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json @@ -57,7 +57,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { @@ -76,7 +76,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 21, "loc": { 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 index b0579df273..440498ffc2 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { 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 index 3881690753..44f93db202 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json @@ -91,7 +91,7 @@ "name": "foo" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 22, "end": 23, "loc": { 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 index c23e216897..5c1b86ad08 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json @@ -43,7 +43,7 @@ } }, "source": { - "type": "Literal", + "type": "StringLiteral", "start": 14, "end": 19, "loc": { 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 index 9b94e4de83..d87b9e3ad0 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json @@ -93,7 +93,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 22, "end": 27, "loc": { 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 index 1f80e99f3b..db67cc7139 100644 --- 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 @@ -93,7 +93,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 29, "end": 34, "loc": { 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 index 263e8769d4..2cf90b4252 100644 --- 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 @@ -93,7 +93,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 25, "end": 30, "loc": { 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 index 39ad36c9ac..dace6e4467 100644 --- 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 @@ -140,7 +140,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 34, "end": 39, "loc": { 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 index 37e27ba6b1..a8b61d3f41 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json @@ -93,7 +93,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 18, "end": 23, "loc": { 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 index 90f8b953b5..71f75f58fb 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json @@ -140,7 +140,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 23, "end": 28, "loc": { 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 index a3474dbd50..c6b1bd5169 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json @@ -110,7 +110,7 @@ } }, "expression": { - "type": "Literal", + "type": "BooleanLiteral", "start": 26, "end": 31, "loc": { 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 index 63b6fdfeec..5801f4b21d 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json @@ -90,7 +90,7 @@ "name": "foo" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 18, "loc": { 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 index af2ce633cb..9ebf178806 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json @@ -90,7 +90,7 @@ "name": "foo" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 17, "end": 18, "loc": { 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 index ed91c27238..f038000230 100644 --- 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 @@ -106,7 +106,7 @@ }, "delegate": true, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 25, "end": 26, "loc": { 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 index 1e6854a12e..3dc0ce6afb 100644 --- a/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json @@ -106,7 +106,7 @@ }, "delegate": false, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 24, "end": 25, "loc": { 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 index aada6e0350..273c61ba5e 100644 --- a/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json @@ -105,7 +105,7 @@ }, "delegate": false, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 21, "end": 22, "loc": { 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 index 86f538137e..4085e3da1c 100644 --- 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 @@ -154,7 +154,7 @@ }, "delegate": true, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { 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 index 652e20d1b3..1696922399 100644 --- 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 @@ -154,7 +154,7 @@ }, "delegate": false, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { 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 index 4fc6768637..a207539d69 100644 --- 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 @@ -171,7 +171,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 24, "loc": { diff --git a/test/fixtures/esprima/es2015-identifier/module_await/expected.json b/test/fixtures/esprima/es2015-identifier/module_await/expected.json index 9ceb584ddd..eff37004fc 100644 --- a/test/fixtures/esprima/es2015-identifier/module_await/expected.json +++ b/test/fixtures/esprima/es2015-identifier/module_await/expected.json @@ -74,7 +74,7 @@ "name": "await" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { 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 index edc235cd14..fd674134a4 100644 --- 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 @@ -123,7 +123,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 23, "end": 28, "loc": { 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 index f4121da033..c83ff40f18 100644 --- 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 @@ -107,7 +107,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 26, "end": 31, "loc": { 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 index ef53af8608..073f43503c 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json @@ -92,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 29, "end": 34, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json index f65d947db8..691a530e45 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 16, "end": 21, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json index 5466ba5614..45b87643fb 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 14, "end": 22, "loc": { diff --git a/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json index bb56815106..652a62b72a 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json @@ -44,7 +44,7 @@ }, "specifiers": [], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 7, "end": 12, "loc": { 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 index 58842b0c0d..4198564920 100644 --- 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 @@ -92,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 25, "end": 30, "loc": { 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 index b063a99cd2..197fd882b6 100644 --- 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 @@ -139,7 +139,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 30, "end": 35, "loc": { 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 index a896b50ab1..45f291208c 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json @@ -44,7 +44,7 @@ }, "specifiers": [], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 20, "loc": { 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 index 6a3be9f6d3..5c0b3036c9 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json @@ -92,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 18, "end": 23, "loc": { 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 index 2913832639..1dd153305f 100644 --- 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 @@ -139,7 +139,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 24, "end": 29, "loc": { 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 index f5152845f5..afcf5e6751 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json @@ -139,7 +139,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 23, "end": 28, "loc": { 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 index 27b3e13863..7a3783c90d 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json @@ -76,7 +76,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 21, "end": 26, "loc": { 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 index 20286c5ce1..166aaf0ed8 100644 --- 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 @@ -92,7 +92,7 @@ } ], "source": { - "type": "Literal", + "type": "StringLiteral", "start": 28, "end": 33, "loc": { diff --git a/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json index 9cb6015642..e61945111a 100644 --- a/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json @@ -120,7 +120,7 @@ "name": "t" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 35, "end": 37, "loc": { @@ -159,7 +159,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json index c05da73d96..29fd63476c 100644 --- a/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 6, "end": 14, "loc": { 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-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-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-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-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/proto-identifier-getter-setter/expected.json b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter-setter/expected.json index 226684195f..e61c4bc6c6 100644 --- 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 @@ -91,7 +91,7 @@ "name": "__proto__" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 14, "end": 18, "loc": { @@ -103,10 +103,7 @@ "line": 1, "column": 18 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, 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 index 799d51e116..10aa2e429a 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json @@ -91,7 +91,7 @@ "name": "__proto__" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 14, "end": 18, "loc": { @@ -103,10 +103,7 @@ "line": 1, "column": 18 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, 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 index 12192e3584..fb0485d90d 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json @@ -91,7 +91,7 @@ "name": "__proto__" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 14, "end": 18, "loc": { @@ -103,10 +103,7 @@ "line": 1, "column": 18 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, 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 index b85b34999c..b112cc6b98 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json @@ -91,7 +91,7 @@ "name": "__proto__" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 14, "end": 18, "loc": { @@ -103,10 +103,7 @@ "line": 1, "column": 18 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, 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 index fb52590573..3a347ec1c3 100644 --- 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 @@ -75,7 +75,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 3, "end": 14, "loc": { @@ -93,7 +93,7 @@ "raw": "\"__proto__\"" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 16, "end": 20, "loc": { @@ -105,10 +105,7 @@ "line": 1, "column": 20 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, 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 index 981e9ca6a1..ec071f8f38 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json @@ -75,7 +75,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 3, "end": 14, "loc": { @@ -93,7 +93,7 @@ "raw": "\"__proto__\"" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 16, "end": 20, "loc": { @@ -105,10 +105,7 @@ "line": 1, "column": 20 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, 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 index aaff700170..a37ebb0e39 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json @@ -75,7 +75,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 3, "end": 14, "loc": { @@ -93,7 +93,7 @@ "raw": "\"__proto__\"" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 16, "end": 20, "loc": { @@ -105,10 +105,7 @@ "line": 1, "column": 20 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, 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 index 92e920ccdd..5300afd3aa 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json @@ -75,7 +75,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 3, "end": 14, "loc": { @@ -93,7 +93,7 @@ "raw": "\"__proto__\"" }, "value": { - "type": "Literal", + "type": "NullLiteral", "start": 16, "end": 20, "loc": { @@ -105,10 +105,7 @@ "line": 1, "column": 20 } - }, - "value": null, - "rawValue": null, - "raw": "null" + } }, "kind": "init" }, diff --git a/test/fixtures/esprima/es2015-object-pattern/elision/expected.json b/test/fixtures/esprima/es2015-object-pattern/elision/expected.json index 7b239f85db..28f02d871c 100644 --- a/test/fixtures/esprima/es2015-object-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/elision/expected.json @@ -126,7 +126,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { 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 index d3ba43788a..dd2b8aee4b 100644 --- a/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json @@ -93,7 +93,7 @@ "kind": "let" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json index dbbd5e0895..194a2277c7 100644 --- a/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json @@ -74,7 +74,7 @@ "properties": [] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json index 24ff27c2f1..cf2b1a4c73 100644 --- a/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json @@ -74,7 +74,7 @@ "properties": [] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { diff --git a/test/fixtures/esprima/es2015-object-pattern/nested/expected.json b/test/fixtures/esprima/es2015-object-pattern/nested/expected.json index 1e70efa276..bcf6c6414e 100644 --- a/test/fixtures/esprima/es2015-object-pattern/nested/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/nested/expected.json @@ -126,7 +126,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/esprima/es2015-object-pattern/properties/expected.json b/test/fixtures/esprima/es2015-object-pattern/properties/expected.json index 3540998633..e35d04f735 100644 --- a/test/fixtures/esprima/es2015-object-pattern/properties/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/properties/expected.json @@ -188,7 +188,7 @@ "name": "b" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -322,7 +322,7 @@ "name": "f" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { @@ -413,7 +413,7 @@ ] }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 30, "end": 31, "loc": { 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 index 7071e2971b..1e3d179cd6 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 2, "loc": { 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 index 198d34971a..ccdde2fe5f 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { 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 index 205a96ab16..b8fdcdd6b2 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json @@ -91,7 +91,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 29, "loc": { @@ -124,7 +124,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 31, "end": 34, "loc": { 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 index 5e0a93482f..58c5a75980 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { 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 index 99d27ef22c..fc506965ec 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 4, "loc": { 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 index b97a7679b0..0e4a704196 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 3, "loc": { 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 index e3ee2c9f37..ed92c39059 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json @@ -91,7 +91,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 29, "loc": { @@ -124,7 +124,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 31, "end": 34, "loc": { 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 index 0b852348e3..7c3f550db9 100644 --- a/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json +++ b/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json @@ -88,7 +88,7 @@ } }, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { 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 index f0ce7bb220..0e3260dc1b 100644 --- a/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json +++ b/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json @@ -88,7 +88,7 @@ } }, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { diff --git a/test/fixtures/esprima/es2015-super-property/super_computed/expected.json b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json index ff1ee7f02a..d70c83f48b 100644 --- a/test/fixtures/esprima/es2015-super-property/super_computed/expected.json +++ b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json @@ -199,7 +199,7 @@ } }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 51, "end": 52, "loc": { diff --git a/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json b/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json index 0dade7f955..6257eab282 100644 --- a/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json +++ b/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 45, "loc": { diff --git a/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json b/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json index a2c5419a32..8119243646 100644 --- a/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json +++ b/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 23, "loc": { 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 index aa36f4ccae..84b416c9b8 100644 --- a/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json +++ b/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 50, "loc": { 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 index 8572ac41d4..0ac274c801 100644 --- 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 @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 35, "loc": { 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 index 0192886854..319843f197 100644 --- 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 @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 45, "loc": { 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 index 965abbf51a..e2ea996f44 100644 --- 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 @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 33, "loc": { 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 index 4fdb12deff..c1d8db8a5f 100644 --- a/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json @@ -78,7 +78,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { diff --git a/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json index dec93c479a..950f430f09 100644 --- a/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json @@ -74,7 +74,7 @@ "name": "yield" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { @@ -93,7 +93,7 @@ } } ], - "kind": "var" + "kind": "let" } ] } 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 index cff6332edb..b3a07a17aa 100644 --- a/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { diff --git a/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json b/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json index 73ba30aca8..dc762096f1 100644 --- a/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { diff --git a/test/fixtures/esprima/expression-additive/migrated_0002/expected.json b/test/fixtures/esprima/expression-additive/migrated_0002/expected.json index d3ad9d674b..8adc9b67d6 100644 --- a/test/fixtures/esprima/expression-additive/migrated_0002/expected.json +++ b/test/fixtures/esprima/expression-additive/migrated_0002/expected.json @@ -57,7 +57,7 @@ } }, "left": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { @@ -76,7 +76,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json index dcfe85d992..886a4c91ba 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 4, "end": 6, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json index 32e9683fad..087953e749 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json @@ -74,7 +74,7 @@ "name": "eval" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json index aadc603158..c40cefe77a 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json @@ -74,7 +74,7 @@ "name": "arguments" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json index c68b13b4a8..77c0b3f6fd 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json index 2a2e320c76..3ea5616140 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json index f61cd91960..3bb965131c 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json index d87bd7221e..623bec2d65 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json index 58ac4f76d5..169b55b357 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json index 6aec1fd6ae..395bbc5959 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 8, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json index 2afa7f1ab0..f2baaf2d7c 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 8, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json index 34ae7fde25..63767ff44b 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json index a97d4cb79e..22bf53cf58 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json index 7a092cae1b..52cfe31685 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json index 0c297787a4..0cb0e23497 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 7, "loc": { diff --git a/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json index 355a73a1ad..9252297ac7 100644 --- a/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json +++ b/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json @@ -73,7 +73,7 @@ "name": "y" }, "consequent": { - "type": "Literal", + "type": "NumberLiteral", "start": 4, "end": 5, "loc": { @@ -91,7 +91,7 @@ "raw": "1" }, "alternate": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json index 618615ef5f..6d0cf5e9ff 100644 --- a/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json +++ b/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json @@ -105,7 +105,7 @@ } }, "consequent": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 10, "loc": { @@ -123,7 +123,7 @@ "raw": "1" }, "alternate": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json index 3875482cdf..9d2c4afc3f 100644 --- a/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json +++ b/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json @@ -88,7 +88,7 @@ } }, "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { @@ -107,7 +107,7 @@ "parenthesizedExpression": true }, "consequent": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { @@ -125,7 +125,7 @@ "raw": "1" }, "alternate": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { diff --git a/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json b/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json index 68090be774..a926bd6ac4 100644 --- a/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json +++ b/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json @@ -71,7 +71,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 1, "end": 2, "loc": { @@ -91,7 +91,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 8, "loc": { @@ -112,7 +112,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { diff --git a/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json b/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json index df6409e3a6..efa51994a8 100644 --- a/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json +++ b/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json @@ -71,7 +71,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 0, "end": 1, "loc": { @@ -90,7 +90,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 4, "end": 5, "loc": { @@ -110,7 +110,7 @@ }, "operator": "<<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { 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 index cca9b0fc82..f26ab8b935 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json @@ -87,7 +87,7 @@ "name": "universe" }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { 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 index 463a77c2e5..624c7b81b9 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json @@ -88,7 +88,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { 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 index fab1521321..23d090fedc 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json @@ -116,7 +116,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 9, "end": 11, "loc": { @@ -155,7 +155,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 22, "end": 24, "loc": { @@ -173,7 +173,7 @@ "raw": "14" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 26, "end": 27, "loc": { @@ -191,7 +191,7 @@ "raw": "3" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 29, "end": 31, "loc": { 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 index 762a4f980c..080068549b 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json @@ -170,7 +170,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "NumberLiteral", "start": 40, "end": 44, "loc": { 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_0092/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json index 167116741e..0590c2b7e6 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:7)" -} \ No newline at end of file + "throws": "Argument name clash in strict mode (1:4)" +} diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json index b3e95a5757..69a9237df8 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json @@ -1,3 +1,3 @@ { - "throws": "Binding static in strict mode (1:23)" + "throws": "The keyword 'static' is reserved (1:23)" } diff --git a/test/fixtures/esprima/statement-break/migrated_0000/expected.json b/test/fixtures/esprima/statement-break/migrated_0000/expected.json index 1d9fe4c071..15042df691 100644 --- a/test/fixtures/esprima/statement-break/migrated_0000/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0000/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/statement-break/migrated_0001/expected.json b/test/fixtures/esprima/statement-break/migrated_0001/expected.json index de1ad554fa..be48009734 100644 --- a/test/fixtures/esprima/statement-break/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0001/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-break/migrated_0002/expected.json b/test/fixtures/esprima/statement-break/migrated_0002/expected.json index 62a3160e6e..6c31c586d6 100644 --- a/test/fixtures/esprima/statement-break/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0002/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-break/migrated_0003/expected.json b/test/fixtures/esprima/statement-break/migrated_0003/expected.json index afc5d3b147..650a39cbce 100644 --- a/test/fixtures/esprima/statement-break/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0003/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-continue/migrated_0000/expected.json b/test/fixtures/esprima/statement-continue/migrated_0000/expected.json index 9ea0854331..40763456b0 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0000/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0000/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/statement-continue/migrated_0001/expected.json b/test/fixtures/esprima/statement-continue/migrated_0001/expected.json index 3cadc13b16..bfea074cf1 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0001/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/statement-continue/migrated_0002/expected.json b/test/fixtures/esprima/statement-continue/migrated_0002/expected.json index 661b7b9d0a..f43031468c 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0002/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-continue/migrated_0003/expected.json b/test/fixtures/esprima/statement-continue/migrated_0003/expected.json index 3c06ab2a96..3b684f46cb 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0003/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-continue/migrated_0004/expected.json b/test/fixtures/esprima/statement-continue/migrated_0004/expected.json index 9df58ecc04..6c809ee4ec 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0004/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-expression/migrated_0002/expected.json b/test/fixtures/esprima/statement-expression/migrated_0002/expected.json index 6ba5acf72c..5456f44f4a 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0002/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-expression/migrated_0003/expected.json b/test/fixtures/esprima/statement-expression/migrated_0003/expected.json index f78a5fc028..93af56eb06 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0003/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 23, "loc": { diff --git a/test/fixtures/esprima/statement-expression/migrated_0004/expected.json b/test/fixtures/esprima/statement-expression/migrated_0004/expected.json index cf73b407c2..ddf30e2b43 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0004/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 23, "loc": { diff --git a/test/fixtures/esprima/statement-expression/migrated_0005/expected.json b/test/fixtures/esprima/statement-expression/migrated_0005/expected.json index ab84cdb1ac..eee513b5d0 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0005/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0005/expected.json @@ -74,7 +74,7 @@ "name": "source" }, "init": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 24, "loc": { diff --git a/test/fixtures/esprima/statement-if/migrated_0002/expected.json b/test/fixtures/esprima/statement-if/migrated_0002/expected.json index c1930814e6..086e802703 100644 --- a/test/fixtures/esprima/statement-if/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-if/migrated_0002/expected.json @@ -104,7 +104,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 21, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-if/migrated_0005/expected.json b/test/fixtures/esprima/statement-if/migrated_0005/expected.json index bede5565cc..07468bf95b 100644 --- a/test/fixtures/esprima/statement-if/migrated_0005/expected.json +++ b/test/fixtures/esprima/statement-if/migrated_0005/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 4, "end": 8, "loc": { diff --git a/test/fixtures/esprima/statement-if/migrated_0006/expected.json b/test/fixtures/esprima/statement-if/migrated_0006/expected.json index 79b23952bd..828179ffc2 100644 --- a/test/fixtures/esprima/statement-if/migrated_0006/expected.json +++ b/test/fixtures/esprima/statement-if/migrated_0006/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 4, "end": 8, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json index a065c54055..298c6ed2b8 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json @@ -90,7 +90,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json index bcc441a257..cf9db0e4fd 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json @@ -90,7 +90,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json index 09c2e86050..3bd687b08d 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json @@ -187,7 +187,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 28, "end": 30, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json index 7a2fd03273..7666f67d1b 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json @@ -74,7 +74,7 @@ "body": [] }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 16, "end": 21, "loc": { @@ -107,7 +107,7 @@ } }, "expression": { - "type": "Literal", + "type": "BooleanLiteral", "start": 23, "end": 28, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json index a3c55814f4..033f8a99dd 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json @@ -90,7 +90,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 17, "end": 21, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json index 1ee7296f46..ff791459e4 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json @@ -90,7 +90,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 18, "end": 22, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json index e3ddda1e17..b68c4e6106 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json @@ -43,7 +43,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json index bf0cf79afd..c7381370ab 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json @@ -74,7 +74,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json index 0221127370..f45ca7088d 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json index 46c4e44c8f..6640f73295 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json index 5f7188a434..e10d00d731 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json index 20b89977b6..61391fdd9f 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json @@ -88,7 +88,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { @@ -137,7 +137,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json index 66dff360f5..fb76721dce 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json index 1943c72a2e..f826f885de 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json index ea41666efe..16f684a226 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 9, "loc": { @@ -124,7 +124,7 @@ }, "operator": "<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { diff --git a/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json index eac72f5d2b..f06c613c23 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json @@ -138,7 +138,7 @@ ] }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 16, "loc": { diff --git a/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json b/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json index cddf16fc26..c4f9e0e386 100644 --- a/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json @@ -57,7 +57,7 @@ } }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 14, "end": 18, "loc": { diff --git a/test/fixtures/esprima/statement-switch/migrated_0001/expected.json b/test/fixtures/esprima/statement-switch/migrated_0001/expected.json index 62e79f338e..9758d61707 100644 --- a/test/fixtures/esprima/statement-switch/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-switch/migrated_0001/expected.json @@ -139,7 +139,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { diff --git a/test/fixtures/esprima/statement-switch/migrated_0002/expected.json b/test/fixtures/esprima/statement-switch/migrated_0002/expected.json index b29ad0f66d..7400509d5f 100644 --- a/test/fixtures/esprima/statement-switch/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-switch/migrated_0002/expected.json @@ -139,7 +139,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { diff --git a/test/fixtures/esprima/statement-throw/migrated_0002/expected.json b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json index fe437eefa7..dc9afaed76 100644 --- a/test/fixtures/esprima/statement-throw/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json @@ -91,7 +91,7 @@ "name": "message" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 24, "loc": { diff --git a/test/fixtures/esprima/statement-variable/migrated_0002/expected.json b/test/fixtures/esprima/statement-variable/migrated_0002/expected.json index a5b0f49382..746c634e18 100644 --- a/test/fixtures/esprima/statement-variable/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-variable/migrated_0002/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { diff --git a/test/fixtures/esprima/statement-variable/migrated_0003/expected.json b/test/fixtures/esprima/statement-variable/migrated_0003/expected.json index 6ed6cc90fa..e88bd0e0af 100644 --- a/test/fixtures/esprima/statement-variable/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-variable/migrated_0003/expected.json @@ -74,7 +74,7 @@ "name": "eval" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 13, "loc": { @@ -123,7 +123,7 @@ "name": "arguments" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 27, "end": 29, "loc": { diff --git a/test/fixtures/esprima/statement-variable/migrated_0004/expected.json b/test/fixtures/esprima/statement-variable/migrated_0004/expected.json index 6b9e9e3f3a..f0f1cc157c 100644 --- a/test/fixtures/esprima/statement-variable/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-variable/migrated_0004/expected.json @@ -74,7 +74,7 @@ "name": "x" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 8, "end": 10, "loc": { @@ -123,7 +123,7 @@ "name": "y" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { @@ -172,7 +172,7 @@ "name": "z" }, "init": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 27, "loc": { diff --git a/test/fixtures/experimental/async-functions/pattern/expected.json b/test/fixtures/experimental/async-functions/pattern/expected.json index 6a7dde062f..1793ef0b6f 100644 --- a/test/fixtures/experimental/async-functions/pattern/expected.json +++ b/test/fixtures/experimental/async-functions/pattern/expected.json @@ -157,7 +157,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "StringLiteral", "start": 24, "end": 38, "loc": { diff --git a/test/fixtures/experimental/uncategorised/21/expected.json b/test/fixtures/experimental/uncategorised/21/expected.json index 21fcf81f56..99ba85f172 100644 --- a/test/fixtures/experimental/uncategorised/21/expected.json +++ b/test/fixtures/experimental/uncategorised/21/expected.json @@ -122,7 +122,7 @@ "name": "a" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { diff --git a/test/fixtures/experimental/uncategorised/26/expected.json b/test/fixtures/experimental/uncategorised/26/expected.json index 04b1d89257..8ee2fcb4e1 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": { @@ -139,7 +139,7 @@ "raw": "1" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 15, "loc": { @@ -178,6 +178,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/experimental/uncategorised/28/expected.json b/test/fixtures/experimental/uncategorised/28/expected.json index 2ac6e0d7d9..882187725b 100644 --- a/test/fixtures/experimental/uncategorised/28/expected.json +++ b/test/fixtures/experimental/uncategorised/28/expected.json @@ -172,7 +172,7 @@ "name": "async" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 33, "end": 35, "loc": { @@ -197,6 +197,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/experimental/uncategorised/3/expected.json b/test/fixtures/experimental/uncategorised/3/expected.json index b3b034a0f3..b292c27d73 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": { diff --git a/test/fixtures/experimental/uncategorised/30/expected.json b/test/fixtures/experimental/uncategorised/30/expected.json index b632f91acc..3f7882d5fb 100644 --- a/test/fixtures/experimental/uncategorised/30/expected.json +++ b/test/fixtures/experimental/uncategorised/30/expected.json @@ -121,7 +121,7 @@ "name": "async" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 19, "end": 25, "loc": { diff --git a/test/fixtures/experimental/uncategorised/39/expected.json b/test/fixtures/experimental/uncategorised/39/expected.json index ae7ad96b18..10b9a29f22 100644 --- a/test/fixtures/experimental/uncategorised/39/expected.json +++ b/test/fixtures/experimental/uncategorised/39/expected.json @@ -170,7 +170,7 @@ "name": "foo" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 22, "loc": { diff --git a/test/fixtures/experimental/uncategorised/4/expected.json b/test/fixtures/experimental/uncategorised/4/expected.json index b80d1e3d1d..3487223172 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": { @@ -107,7 +107,7 @@ }, "operator": "**", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/experimental/uncategorised/43/expected.json b/test/fixtures/experimental/uncategorised/43/expected.json index b60ecb31ce..fdf472db55 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": { diff --git a/test/fixtures/experimental/uncategorised/46/expected.json b/test/fixtures/experimental/uncategorised/46/expected.json index c04b1ed63a..9035cd541b 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": { diff --git a/test/fixtures/experimental/uncategorised/47/expected.json b/test/fixtures/experimental/uncategorised/47/expected.json index bda9a3aa5f..529bbb3a16 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": { diff --git a/test/fixtures/experimental/uncategorised/48/expected.json b/test/fixtures/experimental/uncategorised/48/expected.json index 4a67cce782..0a295b8d9b 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": { diff --git a/test/fixtures/experimental/uncategorised/49/expected.json b/test/fixtures/experimental/uncategorised/49/expected.json index dfcd786eed..1017436d55 100644 --- a/test/fixtures/experimental/uncategorised/49/expected.json +++ b/test/fixtures/experimental/uncategorised/49/expected.json @@ -155,7 +155,7 @@ "name": "bar" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 22, "end": 27, "loc": { diff --git a/test/fixtures/experimental/uncategorised/5/expected.json b/test/fixtures/experimental/uncategorised/5/expected.json index 645aef02a4..8a1368ec93 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": { @@ -90,7 +90,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -109,7 +109,7 @@ }, "operator": "**", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 11, "end": 12, "loc": { diff --git a/test/fixtures/experimental/uncategorised/50/expected.json b/test/fixtures/experimental/uncategorised/50/expected.json index 1ee24c7d22..982de0b582 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": { diff --git a/test/fixtures/experimental/uncategorised/51/expected.json b/test/fixtures/experimental/uncategorised/51/expected.json index fce4a529c1..6c2099d8f6 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": { diff --git a/test/fixtures/experimental/uncategorised/52/expected.json b/test/fixtures/experimental/uncategorised/52/expected.json index ce4be697a2..c0646aafb4 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": { diff --git a/test/fixtures/experimental/uncategorised/53/expected.json b/test/fixtures/experimental/uncategorised/53/expected.json index 2808aa7406..1b94aadbe9 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": { diff --git a/test/fixtures/experimental/uncategorised/54/expected.json b/test/fixtures/experimental/uncategorised/54/expected.json index a8787da9bf..e7128ee647 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": { diff --git a/test/fixtures/experimental/uncategorised/55/expected.json b/test/fixtures/experimental/uncategorised/55/expected.json index 7f7e0e35a4..4935b2fec0 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": { @@ -108,7 +108,7 @@ "raw": "'='" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/experimental/uncategorised/58/expected.json b/test/fixtures/experimental/uncategorised/58/expected.json index 81f0200f6c..9cf1dfe1ed 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": { diff --git a/test/fixtures/experimental/uncategorised/6/expected.json b/test/fixtures/experimental/uncategorised/6/expected.json index 15ed38285c..c0f4e3fb97 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": { @@ -90,7 +90,7 @@ } }, "left": { - "type": "Literal", + "type": "NumberLiteral", "start": 5, "end": 6, "loc": { @@ -109,7 +109,7 @@ }, "operator": "**", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { 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/7/expected.json b/test/fixtures/experimental/uncategorised/7/expected.json index 2bf4b6353d..a2a7cb100c 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": { @@ -106,7 +106,7 @@ "operator": "-", "prefix": true, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 8, "loc": { @@ -128,7 +128,7 @@ }, "operator": "*", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 13, "loc": { diff --git a/test/fixtures/experimental/uncategorised/8/expected.json b/test/fixtures/experimental/uncategorised/8/expected.json index f9cf647bff..adb1668c02 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": { @@ -106,7 +106,7 @@ "operator": "-", "prefix": true, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -127,7 +127,7 @@ }, "operator": "*", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { diff --git a/test/fixtures/flow/declare-module/2/expected.json b/test/fixtures/flow/declare-module/2/expected.json index 71ef4876cd..4b8d16c85b 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": { @@ -78,6 +78,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/flow/regression/issue-2083/expected.json b/test/fixtures/flow/regression/issue-2083/expected.json index 41723449a1..b6f6514238 100644 --- a/test/fixtures/flow/regression/issue-2083/expected.json +++ b/test/fixtures/flow/regression/issue-2083/expected.json @@ -156,7 +156,7 @@ } }, "discriminant": { - "type": "Literal", + "type": "NumberLiteral", "start": 34, "end": 35, "loc": { @@ -436,7 +436,7 @@ }, "operator": "<<", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 144, "end": 145, "loc": { diff --git a/test/fixtures/flow/tuples/3/expected.json b/test/fixtures/flow/tuples/3/expected.json index 986bbd31ac..21c02d7040 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": { @@ -160,6 +160,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ 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..17eb3accf4 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": { @@ -169,7 +169,7 @@ "raw": "123" }, { - "type": "Literal", + "type": "StringLiteral", "start": 33, "end": 39, "loc": { @@ -193,6 +193,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ 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..1b09f8300e 100644 --- a/test/fixtures/flow/type-annotations/26/expected.json +++ b/test/fixtures/flow/type-annotations/26/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "NumberLiteral", "start": 3, "end": 6, "loc": { @@ -310,6 +310,5 @@ } } ] - }, - "comments": [] + } } \ 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..a13ad52d6e 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": { @@ -185,7 +185,7 @@ "raw": "1" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 26, "end": 27, "loc": { @@ -203,7 +203,7 @@ "raw": "2" }, { - "type": "Literal", + "type": "NumberLiteral", "start": 29, "end": 30, "loc": { @@ -227,6 +227,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ 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..d251f51520 100644 --- a/test/fixtures/flow/type-annotations/50/expected.json +++ b/test/fixtures/flow/type-annotations/50/expected.json @@ -219,7 +219,7 @@ } }, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 40, "end": 42, "loc": { @@ -278,6 +278,5 @@ } } ] - }, - "comments": [] + } } \ 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..1168baaca8 100644 --- a/test/fixtures/flow/type-annotations/51/expected.json +++ b/test/fixtures/flow/type-annotations/51/expected.json @@ -90,7 +90,7 @@ }, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 12, "end": 17, "loc": { @@ -183,6 +183,5 @@ } } ] - }, - "comments": [] + } } \ 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..7b5fe45e43 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": { @@ -158,6 +158,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ 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..e74d96fd69 100644 --- a/test/fixtures/flow/type-annotations/60/expected.json +++ b/test/fixtures/flow/type-annotations/60/expected.json @@ -255,7 +255,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 30, "end": 37, "loc": { @@ -281,6 +281,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ 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..e0d9d00c06 100644 --- a/test/fixtures/flow/type-annotations/61/expected.json +++ b/test/fixtures/flow/type-annotations/61/expected.json @@ -255,7 +255,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 29, "end": 36, "loc": { @@ -281,6 +281,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ 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..505317d656 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": { @@ -208,6 +208,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ 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..6a74fc876f 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": { @@ -96,6 +96,5 @@ } } ] - }, - "comments": [] + } } \ 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..645f92bcbf 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": { @@ -96,6 +96,5 @@ } } ] - }, - "comments": [] + } } \ 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..58a81038df 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": { @@ -159,6 +159,5 @@ } } ] - }, - "comments": [] + } } \ 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..3877416eba 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": { @@ -112,6 +112,5 @@ } } ] - }, - "comments": [] + } } \ 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..11fcfc35ba 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": { @@ -96,6 +96,5 @@ } } ] - }, - "comments": [] + } } \ 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..f12baf85de 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": { @@ -143,6 +143,5 @@ } } ] - }, - "comments": [] + } } \ 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..770d5376af 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": { @@ -96,6 +96,5 @@ } } ] - }, - "comments": [] + } } \ 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..4570cc24e3 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": { @@ -96,6 +96,5 @@ } } ] - }, - "comments": [] + } } \ 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..a02b5f1134 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": { @@ -110,6 +109,7 @@ "rawValue": "foobar", "raw": "\"foobar\"" }, + "exportKind": "type", "declaration": null } ] diff --git a/test/fixtures/flow/typecasts/2/expected.json b/test/fixtures/flow/typecasts/2/expected.json index b703a717b9..d336563032 100644 --- a/test/fixtures/flow/typecasts/2/expected.json +++ b/test/fixtures/flow/typecasts/2/expected.json @@ -105,7 +105,7 @@ "name": "xxx" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 8, "loc": { @@ -158,7 +158,7 @@ "name": "yyy" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 20, "loc": { @@ -311,6 +311,5 @@ } } ] - }, - "comments": [] + } } \ 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..b11b08e49e 100644 --- a/test/fixtures/flow/typecasts/3/expected.json +++ b/test/fixtures/flow/typecasts/3/expected.json @@ -124,7 +124,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 17, "loc": { @@ -243,6 +243,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/computed-properties/call-expression/expected.json b/test/fixtures/harmony/computed-properties/call-expression/expected.json index df5fedc3b7..ffcd91d394 100644 --- a/test/fixtures/harmony/computed-properties/call-expression/expected.json +++ b/test/fixtures/harmony/computed-properties/call-expression/expected.json @@ -138,7 +138,7 @@ "arguments": [] }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 23, "end": 25, "loc": { @@ -164,6 +164,5 @@ "kind": "var" } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/1/expected.json b/test/fixtures/harmony/uncategorised/1/expected.json index a9ae440c03..6a4ff90185 100644 --- a/test/fixtures/harmony/uncategorised/1/expected.json +++ b/test/fixtures/harmony/uncategorised/1/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 18, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "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..263b4b83d5 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..2e0186e88f 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": { @@ -146,6 +146,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/11/expected.json b/test/fixtures/harmony/uncategorised/11/expected.json index a6833d9df8..372c9fce63 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..607cd3e194 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..76c74308aa 100644 --- a/test/fixtures/harmony/uncategorised/123/expected.json +++ b/test/fixtures/harmony/uncategorised/123/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { @@ -243,6 +243,5 @@ } } ] - }, - "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..964171a1ab 100644 --- a/test/fixtures/harmony/uncategorised/124/expected.json +++ b/test/fixtures/harmony/uncategorised/124/expected.json @@ -90,7 +90,7 @@ }, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 9, "end": 22, "loc": { diff --git a/test/fixtures/harmony/uncategorised/13/expected.json b/test/fixtures/harmony/uncategorised/13/expected.json index 2f625b7911..23356e76be 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/130/expected.json b/test/fixtures/harmony/uncategorised/130/expected.json index c0bdfdc191..6f0fe5e565 100644 --- a/test/fixtures/harmony/uncategorised/130/expected.json +++ b/test/fixtures/harmony/uncategorised/130/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 12, "loc": { @@ -243,6 +243,5 @@ } } ] - }, - "comments": [] + } } \ 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..be3c47afa8 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..d47fdad79c 100644 --- a/test/fixtures/harmony/uncategorised/141/expected.json +++ b/test/fixtures/harmony/uncategorised/141/expected.json @@ -91,7 +91,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { @@ -115,6 +115,5 @@ } } ] - }, - "comments": [] + } } \ 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..259c9600a4 100644 --- a/test/fixtures/harmony/uncategorised/142/expected.json +++ b/test/fixtures/harmony/uncategorised/142/expected.json @@ -89,7 +89,7 @@ } }, "left": { - "type": "Literal", + "type": "StringLiteral", "start": 3, "end": 6, "loc": { @@ -108,7 +108,7 @@ }, "operator": "+", "right": { - "type": "Literal", + "type": "StringLiteral", "start": 9, "end": 12, "loc": { @@ -127,7 +127,7 @@ } }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { @@ -151,6 +151,5 @@ } } ] - }, - "comments": [] + } } \ 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..2e3bc139b5 100644 --- a/test/fixtures/harmony/uncategorised/144/expected.json +++ b/test/fixtures/harmony/uncategorised/144/expected.json @@ -91,7 +91,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 7, "end": 9, "loc": { @@ -144,7 +144,7 @@ "name": "y" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { @@ -168,6 +168,5 @@ } } ] - }, - "comments": [] + } } \ 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..ae57cab25c 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..f48012f5a7 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": { @@ -163,6 +163,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..c58bffb9c1 100644 --- a/test/fixtures/harmony/uncategorised/153/expected.json +++ b/test/fixtures/harmony/uncategorised/153/expected.json @@ -192,7 +192,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 21, "end": 23, "loc": { @@ -233,6 +233,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..da3399ea06 100644 --- a/test/fixtures/harmony/uncategorised/154/expected.json +++ b/test/fixtures/harmony/uncategorised/154/expected.json @@ -222,7 +222,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { @@ -265,6 +265,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..e1d8689d55 100644 --- a/test/fixtures/harmony/uncategorised/155/expected.json +++ b/test/fixtures/harmony/uncategorised/155/expected.json @@ -239,7 +239,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 24, "end": 26, "loc": { @@ -286,6 +286,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..02567ac39f 100644 --- a/test/fixtures/harmony/uncategorised/156/expected.json +++ b/test/fixtures/harmony/uncategorised/156/expected.json @@ -240,7 +240,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 14, "end": 16, "loc": { @@ -286,6 +286,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..2995b318d4 100644 --- a/test/fixtures/harmony/uncategorised/157/expected.json +++ b/test/fixtures/harmony/uncategorised/157/expected.json @@ -255,7 +255,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 22, "loc": { @@ -302,6 +302,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..a58c38c687 100644 --- a/test/fixtures/harmony/uncategorised/158/expected.json +++ b/test/fixtures/harmony/uncategorised/158/expected.json @@ -191,7 +191,7 @@ "name": "x" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 12, "end": 14, "loc": { @@ -234,6 +234,5 @@ } } ] - }, - "comments": [] + } } \ 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..8f7d2304f4 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": { @@ -161,6 +161,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..4937dfc854 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..beb32095e0 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": { @@ -129,6 +129,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..133d3320bc 100644 --- a/test/fixtures/harmony/uncategorised/161/expected.json +++ b/test/fixtures/harmony/uncategorised/161/expected.json @@ -170,7 +170,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 20, "end": 21, "loc": { @@ -213,6 +213,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..36f0dea590 100644 --- a/test/fixtures/harmony/uncategorised/162/expected.json +++ b/test/fixtures/harmony/uncategorised/162/expected.json @@ -171,7 +171,7 @@ "name": "a" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { @@ -213,6 +213,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..e6cfe9f05a 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..0f0150fd2b 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": { @@ -57,10 +57,8 @@ } }, "raw": "/[a-z]/u", - "regex": { - "pattern": "[a-z]", - "flags": "u" - } + "pattern": "[a-z]", + "flags": "u" } } ] diff --git a/test/fixtures/harmony/uncategorised/196/expected.json b/test/fixtures/harmony/uncategorised/196/expected.json index c8b5823f15..13ccb35613 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": { @@ -57,10 +57,8 @@ } }, "raw": "/[\\uD834\\uDF06-\\uD834\\uDF08a-z]/u", - "regex": { - "pattern": "[\\uD834\\uDF06-\\uD834\\uDF08a-z]", - "flags": "u" - } + "pattern": "[\\uD834\\uDF06-\\uD834\\uDF08a-z]", + "flags": "u" } } ] diff --git a/test/fixtures/harmony/uncategorised/197/expected.json b/test/fixtures/harmony/uncategorised/197/expected.json index 8b60d84c91..aa7ff354b4 100644 --- a/test/fixtures/harmony/uncategorised/197/expected.json +++ b/test/fixtures/harmony/uncategorised/197/expected.json @@ -59,7 +59,7 @@ "body": [] }, "test": { - "type": "Literal", + "type": "BooleanLiteral", "start": 13, "end": 18, "loc": { diff --git a/test/fixtures/harmony/uncategorised/2/expected.json b/test/fixtures/harmony/uncategorised/2/expected.json index fd4079e13c..5a854ab9f5 100644 --- a/test/fixtures/harmony/uncategorised/2/expected.json +++ b/test/fixtures/harmony/uncategorised/2/expected.json @@ -43,7 +43,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 0, "end": 27, "loc": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..3d0fad6ce6 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": { @@ -94,6 +94,5 @@ } } ] - }, - "comments": [] + } } \ 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..3aef2ac8d9 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": { @@ -130,6 +130,5 @@ } } ] - }, - "comments": [] + } } \ 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..970d0563d8 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": { @@ -146,6 +146,5 @@ } } ] - }, - "comments": [] + } } \ 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..08ba30f47d 100644 --- a/test/fixtures/harmony/uncategorised/26/expected.json +++ b/test/fixtures/harmony/uncategorised/26/expected.json @@ -154,7 +154,7 @@ "name": "y" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 16, "end": 18, "loc": { @@ -242,7 +242,7 @@ } }, "argument": { - "type": "Literal", + "type": "NumberLiteral", "start": 53, "end": 54, "loc": { diff --git a/test/fixtures/harmony/uncategorised/27/expected.json b/test/fixtures/harmony/uncategorised/27/expected.json index e66752bc00..e61945111a 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": { @@ -159,7 +159,7 @@ } ], "test": { - "type": "Literal", + "type": "NumberLiteral", "start": 23, "end": 25, "loc": { @@ -180,6 +180,5 @@ ] } ] - }, - "comments": [] + } } \ 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..ed4c1605fe 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": { @@ -81,6 +81,5 @@ } } ] - }, - "comments": [] + } } \ 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..c3e068731d 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": { @@ -98,6 +98,5 @@ } } ] - }, - "comments": [] + } } \ 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..1e3d179cd6 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..dc38971fa7 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": { @@ -98,6 +98,5 @@ } } ] - }, - "comments": [] + } } \ 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..89a1eb3ff5 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": { @@ -146,4 +146,4 @@ } ] } -} +} \ 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..448e59b1ff 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": { diff --git a/test/fixtures/harmony/uncategorised/307/expected.json b/test/fixtures/harmony/uncategorised/307/expected.json index 1fca349af8..293ea2a087 100644 --- a/test/fixtures/harmony/uncategorised/307/expected.json +++ b/test/fixtures/harmony/uncategorised/307/expected.json @@ -137,7 +137,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -178,6 +178,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..2517a00a40 100644 --- a/test/fixtures/harmony/uncategorised/308/expected.json +++ b/test/fixtures/harmony/uncategorised/308/expected.json @@ -140,7 +140,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 6, "end": 7, "loc": { @@ -181,6 +181,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..78a133f6c2 100644 --- a/test/fixtures/harmony/uncategorised/309/expected.json +++ b/test/fixtures/harmony/uncategorised/309/expected.json @@ -216,7 +216,7 @@ "name": "c" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 13, "end": 14, "loc": { @@ -262,6 +262,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..4bdd74c258 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": { @@ -114,6 +114,5 @@ } } ] - }, - "comments": [] + } } \ 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..aba62152a7 100644 --- a/test/fixtures/harmony/uncategorised/310/expected.json +++ b/test/fixtures/harmony/uncategorised/310/expected.json @@ -122,7 +122,7 @@ "name": "x" }, "right": { - "type": "Literal", + "type": "NumberLiteral", "start": 10, "end": 11, "loc": { @@ -176,6 +176,5 @@ } } ] - }, - "comments": [] -} + } +} \ 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..49647b97c8 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": { @@ -114,10 +114,8 @@ } }, "raw": "/\\d/", - "regex": { - "pattern": "\\d", - "flags": "" - } + "pattern": "\\d", + "flags": "" }, "property": { "type": "Identifier", @@ -139,7 +137,7 @@ }, "arguments": [ { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 16, "loc": { @@ -159,7 +157,7 @@ ] }, "property": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 19, "loc": { @@ -225,4 +223,4 @@ } ] } -} +} \ 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..bb330b9204 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": { diff --git a/test/fixtures/harmony/uncategorised/319/expected.json b/test/fixtures/harmony/uncategorised/319/expected.json index 15bd7d71f1..136c5bbf00 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": { diff --git a/test/fixtures/harmony/uncategorised/32/expected.json b/test/fixtures/harmony/uncategorised/32/expected.json index 5f23cad1a9..ebd04a794b 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": { @@ -130,6 +130,5 @@ } } ] - }, - "comments": [] + } } \ 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..e03993bade 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": { diff --git a/test/fixtures/harmony/uncategorised/322/expected.json b/test/fixtures/harmony/uncategorised/322/expected.json index 6f01dc81ea..4accd0cb4a 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": { diff --git a/test/fixtures/harmony/uncategorised/33/expected.json b/test/fixtures/harmony/uncategorised/33/expected.json index 73ca4f7fdb..7a3afe8bd4 100644 --- a/test/fixtures/harmony/uncategorised/33/expected.json +++ b/test/fixtures/harmony/uncategorised/33/expected.json @@ -126,7 +126,7 @@ "name": "property" }, "value": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 20, "loc": { @@ -151,6 +151,5 @@ } } ] - }, - "comments": [] + } } \ 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..1f7043e170 100644 --- a/test/fixtures/harmony/uncategorised/338/expected.json +++ b/test/fixtures/harmony/uncategorised/338/expected.json @@ -108,7 +108,7 @@ } }, "expression": { - "type": "Literal", + "type": "BooleanLiteral", "start": 33, "end": 38, "loc": { diff --git a/test/fixtures/harmony/uncategorised/34/expected.json b/test/fixtures/harmony/uncategorised/34/expected.json index 959082456b..287f532194 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": { @@ -161,6 +161,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file 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/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/35/expected.json b/test/fixtures/harmony/uncategorised/35/expected.json index 484d42d231..9a918edee0 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": { @@ -146,6 +146,5 @@ } } ] - }, - "comments": [] + } } \ 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..a1ba25b09e 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": { @@ -132,6 +132,5 @@ } } ] - }, - "comments": [] + } } \ 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..8b3e1161d1 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": { @@ -161,6 +161,5 @@ } } ] - }, - "comments": [] + } } \ 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..ccdde2fe5f 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..3351297bbe 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": { @@ -98,6 +98,5 @@ } } ] - }, - "comments": [] + } } \ 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..cdb3afb5bc 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": { @@ -98,6 +98,5 @@ } } ] - }, - "comments": [] + } } \ 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..c40f9bbb31 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": { @@ -98,6 +98,5 @@ } } ] - }, - "comments": [] + } } \ 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..95224d5129 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": { @@ -114,6 +114,5 @@ } } ] - }, - "comments": [] + } } \ 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..645860e175 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": { @@ -111,7 +111,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 15, "end": 17, "loc": { @@ -131,6 +131,5 @@ } } ] - }, - "comments": [] + } } \ 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..fd39c13ced 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": { @@ -127,7 +127,7 @@ } ], "body": { - "type": "Literal", + "type": "NumberLiteral", "start": 18, "end": 20, "loc": { @@ -147,6 +147,5 @@ } } ] - }, - "comments": [] + } } \ 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..8368737c3f 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": { @@ -134,6 +134,5 @@ } } ] - }, - "comments": [] + } } \ 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..b8fdcdd6b2 100644 --- a/test/fixtures/harmony/uncategorised/5/expected.json +++ b/test/fixtures/harmony/uncategorised/5/expected.json @@ -91,7 +91,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 29, "loc": { @@ -124,7 +124,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 31, "end": 34, "loc": { @@ -146,6 +146,5 @@ } } ] - }, - "comments": [] + } } \ 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..29fd63476c 100644 --- a/test/fixtures/harmony/uncategorised/54/expected.json +++ b/test/fixtures/harmony/uncategorised/54/expected.json @@ -106,7 +106,7 @@ "shorthand": false, "computed": false, "key": { - "type": "Literal", + "type": "StringLiteral", "start": 6, "end": 14, "loc": { @@ -165,6 +165,5 @@ } } ] - }, - "comments": [] + } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/6/expected.json b/test/fixtures/harmony/uncategorised/6/expected.json index 920e80aa74..58c5a75980 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..fc506965ec 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..514934f092 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..0e4a704196 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..70d15519cf 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": { @@ -62,6 +62,5 @@ } } ] - }, - "comments": [] + } } \ 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..ed92c39059 100644 --- a/test/fixtures/harmony/uncategorised/9/expected.json +++ b/test/fixtures/harmony/uncategorised/9/expected.json @@ -91,7 +91,7 @@ } }, "expression": { - "type": "Literal", + "type": "StringLiteral", "start": 17, "end": 29, "loc": { @@ -124,7 +124,7 @@ } }, "expression": { - "type": "Literal", + "type": "NumberLiteral", "start": 31, "end": 34, "loc": { @@ -146,6 +146,5 @@ } } ] - }, - "comments": [] + } } \ 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..ff8fd42d6a 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": { @@ -112,6 +112,5 @@ } } ] - }, - "comments": [] + } } \ 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..6e11605ec5 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": { @@ -63,6 +63,5 @@ } } ] - }, - "comments": [] + } } \ 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..45b87643fb 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": { @@ -95,6 +95,5 @@ } } ] - }, - "comments": [] + } } \ 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..6c4333a59a 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": { @@ -158,6 +158,5 @@ } } ] - }, - "comments": [] + } } \ 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..9df1956fbe 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": { @@ -111,6 +111,5 @@ } } ] - }, - "comments": [] + } } \ 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..140aa920e3 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": { @@ -189,6 +189,5 @@ } } ] - }, - "comments": [] + } } \ 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..166aaf0ed8 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": { @@ -111,6 +111,5 @@ } } ] - }, - "comments": [] + } } \ 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..3ab53b9b3e 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": { @@ -95,6 +95,5 @@ } } ] - }, - "comments": [] + } } \ 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..0386be294e 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": { diff --git a/test/fixtures/jsx/basic/12/expected.json b/test/fixtures/jsx/basic/12/expected.json index 1f3d2013ac..ebf4b56508 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": { diff --git a/test/fixtures/jsx/basic/13/expected.json b/test/fixtures/jsx/basic/13/expected.json index 4d358e1604..6021b7c324 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": [], + "rawValue": null } }, { @@ -262,7 +263,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 31, "end": 50, "loc": { @@ -279,7 +280,8 @@ "rawValue": null, "raw": "monkeys /> gorillas" } - ] + ], + "rawValue": null } } ], diff --git a/test/fixtures/jsx/basic/18/expected.json b/test/fixtures/jsx/basic/18/expected.json index d1b336d98a..4e3544be8b 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": { diff --git a/test/fixtures/jsx/basic/19/expected.json b/test/fixtures/jsx/basic/19/expected.json index bce1bcea7f..ebafdd1cd7 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": { @@ -151,7 +151,7 @@ "name": "pre2" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 24, "end": 35, "loc": { diff --git a/test/fixtures/jsx/basic/3/expected.json b/test/fixtures/jsx/basic/3/expected.json index 0f475db901..bbea012bdf 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": { @@ -203,7 +203,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 15, "end": 16, "loc": { @@ -252,7 +252,7 @@ } }, { - "type": "Literal", + "type": "JSXText", "start": 23, "end": 24, "loc": { diff --git a/test/fixtures/jsx/basic/4/expected.json b/test/fixtures/jsx/basic/4/expected.json index 7d7feea21e..f0367e5afa 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": { @@ -166,7 +166,7 @@ "name": "c" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 13, "end": 16, "loc": { @@ -215,7 +215,7 @@ "name": "d" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 19, "end": 26, "loc": { @@ -264,7 +264,7 @@ "name": "e" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 29, "end": 37, "loc": { diff --git a/test/fixtures/jsx/basic/7/expected.json b/test/fixtures/jsx/basic/7/expected.json index 86927f63d6..6a87f0a92a 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": { @@ -172,7 +172,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 32, "end": 41, "loc": { 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/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/regression/1/expected.json b/test/fixtures/jsx/regression/1/expected.json index 5a09d6bfde..e81c2275a0 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": { @@ -199,7 +199,7 @@ "name": "href" }, "value": { - "type": "Literal", + "type": "StringLiteral", "start": 15, "end": 21, "loc": { @@ -269,7 +269,7 @@ }, "children": [ { - "type": "Literal", + "type": "JSXText", "start": 22, "end": 26, "loc": { @@ -289,7 +289,7 @@ ] }, { - "type": "Literal", + "type": "JSXText", "start": 30, "end": 34, "loc": { diff --git a/test/fixtures/jsx/regression/4/expected.json b/test/fixtures/jsx/regression/4/expected.json index f3c24eb4d5..3b7587e891 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": { diff --git a/test/fixtures/jsx/regression/6/expected.json b/test/fixtures/jsx/regression/6/expected.json index dda6e404ca..8a34a3b69a 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": { diff --git a/test/fixtures/jsx/regression/7/expected.json b/test/fixtures/jsx/regression/7/expected.json index a37ebed7c8..0a092459c2 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": { diff --git a/test/fixtures/jsx/regression/issue-2083/expected.json b/test/fixtures/jsx/regression/issue-2083/expected.json index 258d659c46..fd7a654768 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": { diff --git a/test/fixtures/jsx/regression/issue-2114/expected.json b/test/fixtures/jsx/regression/issue-2114/expected.json index 9259331d8f..303c0e4ca7 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": { From 069b969b1d2e977875ccd76bfe76a4abc572ce9d Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 1 Sep 2015 05:34:11 +0100 Subject: [PATCH 10/31] make export default anoynmous class/function statements - fixes #2205 --- src/parser/statement.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/parser/statement.js b/src/parser/statement.js index 1d8ea87793..614951c802 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -673,10 +673,8 @@ pp.parseExport = function (node) { let needsSemi = false; if (this.eat(tt._function)) { expr = this.parseFunction(expr, true, false, false, true); - if (!expr.id) expr.type = "FunctionExpression"; } else if (this.match(tt._class)) { expr = this.parseClass(expr, true, true); - if (!expr.id) expr.type = "ClassExpression"; } else { needsSemi = true; expr = this.parseMaybeAssign(); From ae85fc02516056f57783dace3f54590c264abbb9 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:13:11 +0100 Subject: [PATCH 11/31] rename features in babylon tests --- test/fixtures/experimental/async-functions/options.json | 2 +- test/fixtures/experimental/uncategorised/10/options.json | 4 ++-- test/fixtures/experimental/uncategorised/11/options.json | 4 ++-- test/fixtures/experimental/uncategorised/12/options.json | 4 ++-- test/fixtures/experimental/uncategorised/13/options.json | 4 ++-- test/fixtures/experimental/uncategorised/14/options.json | 4 ++-- test/fixtures/experimental/uncategorised/15/options.json | 4 ++-- test/fixtures/experimental/uncategorised/16/options.json | 4 ++-- test/fixtures/experimental/uncategorised/17/options.json | 2 +- test/fixtures/experimental/uncategorised/18/options.json | 2 +- test/fixtures/experimental/uncategorised/19/options.json | 2 +- test/fixtures/experimental/uncategorised/20/options.json | 2 +- test/fixtures/experimental/uncategorised/21/options.json | 2 +- test/fixtures/experimental/uncategorised/22/options.json | 2 +- test/fixtures/experimental/uncategorised/23/options.json | 2 +- test/fixtures/experimental/uncategorised/24/options.json | 2 +- test/fixtures/experimental/uncategorised/25/options.json | 2 +- test/fixtures/experimental/uncategorised/26/options.json | 2 +- test/fixtures/experimental/uncategorised/27/options.json | 2 +- test/fixtures/experimental/uncategorised/28/options.json | 2 +- test/fixtures/experimental/uncategorised/29/options.json | 4 ++-- test/fixtures/experimental/uncategorised/3/options.json | 4 ++-- test/fixtures/experimental/uncategorised/30/options.json | 4 ++-- test/fixtures/experimental/uncategorised/31/options.json | 4 ++-- test/fixtures/experimental/uncategorised/32/options.json | 4 ++-- test/fixtures/experimental/uncategorised/33/options.json | 4 ++-- test/fixtures/experimental/uncategorised/34/options.json | 4 ++-- test/fixtures/experimental/uncategorised/35/options.json | 4 ++-- test/fixtures/experimental/uncategorised/36/options.json | 4 ++-- test/fixtures/experimental/uncategorised/37/options.json | 4 ++-- test/fixtures/experimental/uncategorised/38/options.json | 4 ++-- test/fixtures/experimental/uncategorised/39/options.json | 4 ++-- test/fixtures/experimental/uncategorised/4/options.json | 4 ++-- test/fixtures/experimental/uncategorised/40/options.json | 4 ++-- test/fixtures/experimental/uncategorised/41/options.json | 4 ++-- test/fixtures/experimental/uncategorised/42/options.json | 4 ++-- test/fixtures/experimental/uncategorised/43/options.json | 4 ++-- test/fixtures/experimental/uncategorised/44/options.json | 4 ++-- test/fixtures/experimental/uncategorised/45/options.json | 4 ++-- test/fixtures/experimental/uncategorised/46/options.json | 4 ++-- test/fixtures/experimental/uncategorised/47/options.json | 6 +++--- test/fixtures/experimental/uncategorised/48/options.json | 6 +++--- test/fixtures/experimental/uncategorised/49/options.json | 4 ++-- test/fixtures/experimental/uncategorised/5/options.json | 4 ++-- test/fixtures/experimental/uncategorised/50/options.json | 4 ++-- test/fixtures/experimental/uncategorised/51/options.json | 4 ++-- test/fixtures/experimental/uncategorised/52/options.json | 4 ++-- test/fixtures/experimental/uncategorised/53/options.json | 4 ++-- test/fixtures/experimental/uncategorised/54/options.json | 4 ++-- test/fixtures/experimental/uncategorised/55/options.json | 4 ++-- test/fixtures/experimental/uncategorised/56/options.json | 4 ++-- test/fixtures/experimental/uncategorised/57/options.json | 4 ++-- test/fixtures/experimental/uncategorised/58/options.json | 4 ++-- test/fixtures/experimental/uncategorised/59/options.json | 4 ++-- test/fixtures/experimental/uncategorised/6/options.json | 4 ++-- test/fixtures/experimental/uncategorised/60/options.json | 4 ++-- test/fixtures/experimental/uncategorised/61/options.json | 4 ++-- test/fixtures/experimental/uncategorised/62/options.json | 2 +- test/fixtures/experimental/uncategorised/7/options.json | 4 ++-- test/fixtures/experimental/uncategorised/8/options.json | 4 ++-- test/fixtures/experimental/uncategorised/9/options.json | 4 ++-- test/fixtures/flow/options.json | 2 +- test/fixtures/harmony/uncategorised/269/options.json | 4 ++-- test/fixtures/harmony/uncategorised/270/options.json | 4 ++-- test/fixtures/harmony/uncategorised/271/options.json | 4 ++-- test/fixtures/harmony/uncategorised/272/options.json | 4 ++-- test/fixtures/harmony/uncategorised/274/options.json | 4 ++-- test/fixtures/harmony/uncategorised/57/options.json | 2 +- test/fixtures/harmony/uncategorised/58/options.json | 2 +- test/fixtures/harmony/uncategorised/59/options.json | 2 +- test/fixtures/harmony/uncategorised/60/options.json | 2 +- 71 files changed, 125 insertions(+), 125 deletions(-) diff --git a/test/fixtures/experimental/async-functions/options.json b/test/fixtures/experimental/async-functions/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/async-functions/options.json +++ b/test/fixtures/experimental/async-functions/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/10/options.json b/test/fixtures/experimental/uncategorised/10/options.json index 0d83328100..7fd805ebbe 100644 --- a/test/fixtures/experimental/uncategorised/10/options.json +++ b/test/fixtures/experimental/uncategorised/10/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.objectRestSpread": true + "objectRestSpread": true } -} \ 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..7fd805ebbe 100644 --- a/test/fixtures/experimental/uncategorised/11/options.json +++ b/test/fixtures/experimental/uncategorised/11/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.objectRestSpread": true + "objectRestSpread": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/12/options.json b/test/fixtures/experimental/uncategorised/12/options.json index 0d83328100..7fd805ebbe 100644 --- a/test/fixtures/experimental/uncategorised/12/options.json +++ b/test/fixtures/experimental/uncategorised/12/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.objectRestSpread": true + "objectRestSpread": true } -} \ 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..7fd805ebbe 100644 --- a/test/fixtures/experimental/uncategorised/13/options.json +++ b/test/fixtures/experimental/uncategorised/13/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.objectRestSpread": true + "objectRestSpread": true } -} \ 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..7fd805ebbe 100644 --- a/test/fixtures/experimental/uncategorised/14/options.json +++ b/test/fixtures/experimental/uncategorised/14/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.objectRestSpread": true + "objectRestSpread": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/15/options.json b/test/fixtures/experimental/uncategorised/15/options.json index 8dcea40e59..2ba4efc5eb 100644 --- a/test/fixtures/experimental/uncategorised/15/options.json +++ b/test/fixtures/experimental/uncategorised/15/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true }, "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..60befbb037 100644 --- a/test/fixtures/experimental/uncategorised/16/options.json +++ b/test/fixtures/experimental/uncategorised/16/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true }, "throws": "Unexpected token (2:4)" -} \ 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..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/17/options.json +++ b/test/fixtures/experimental/uncategorised/17/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/18/options.json b/test/fixtures/experimental/uncategorised/18/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/18/options.json +++ b/test/fixtures/experimental/uncategorised/18/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/19/options.json b/test/fixtures/experimental/uncategorised/19/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/19/options.json +++ b/test/fixtures/experimental/uncategorised/19/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/20/options.json b/test/fixtures/experimental/uncategorised/20/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/20/options.json +++ b/test/fixtures/experimental/uncategorised/20/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/21/options.json b/test/fixtures/experimental/uncategorised/21/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/21/options.json +++ b/test/fixtures/experimental/uncategorised/21/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/22/options.json b/test/fixtures/experimental/uncategorised/22/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/22/options.json +++ b/test/fixtures/experimental/uncategorised/22/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/23/options.json b/test/fixtures/experimental/uncategorised/23/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/23/options.json +++ b/test/fixtures/experimental/uncategorised/23/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/24/options.json b/test/fixtures/experimental/uncategorised/24/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/24/options.json +++ b/test/fixtures/experimental/uncategorised/24/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/25/options.json b/test/fixtures/experimental/uncategorised/25/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/25/options.json +++ b/test/fixtures/experimental/uncategorised/25/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/26/options.json b/test/fixtures/experimental/uncategorised/26/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/26/options.json +++ b/test/fixtures/experimental/uncategorised/26/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/27/options.json b/test/fixtures/experimental/uncategorised/27/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/27/options.json +++ b/test/fixtures/experimental/uncategorised/27/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/28/options.json b/test/fixtures/experimental/uncategorised/28/options.json index 2fce804177..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/28/options.json +++ b/test/fixtures/experimental/uncategorised/28/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } } diff --git a/test/fixtures/experimental/uncategorised/29/options.json b/test/fixtures/experimental/uncategorised/29/options.json index 50edc4238b..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/29/options.json +++ b/test/fixtures/experimental/uncategorised/29/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } -} \ 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..41c7f66605 100644 --- a/test/fixtures/experimental/uncategorised/3/options.json +++ b/test/fixtures/experimental/uncategorised/3/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.exponentiationOperator": true + "exponentiationOperator": true } -} \ 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..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/30/options.json +++ b/test/fixtures/experimental/uncategorised/30/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } -} \ 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..01e1b60e6b 100644 --- a/test/fixtures/experimental/uncategorised/31/options.json +++ b/test/fixtures/experimental/uncategorised/31/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/32/options.json b/test/fixtures/experimental/uncategorised/32/options.json index 3926a9650c..8958d766f8 100644 --- a/test/fixtures/experimental/uncategorised/32/options.json +++ b/test/fixtures/experimental/uncategorised/32/options.json @@ -1,6 +1,6 @@ { "sourceType": "module", "features": { - "es7.asyncFunctions": true + "asyncFunctions": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/33/options.json b/test/fixtures/experimental/uncategorised/33/options.json index 27f5622b68..2a3b127804 100644 --- a/test/fixtures/experimental/uncategorised/33/options.json +++ b/test/fixtures/experimental/uncategorised/33/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.decorators": true + "decorators": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/34/options.json b/test/fixtures/experimental/uncategorised/34/options.json index 27f5622b68..2a3b127804 100644 --- a/test/fixtures/experimental/uncategorised/34/options.json +++ b/test/fixtures/experimental/uncategorised/34/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.decorators": true + "decorators": true } -} \ 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..2a3b127804 100644 --- a/test/fixtures/experimental/uncategorised/35/options.json +++ b/test/fixtures/experimental/uncategorised/35/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.decorators": true + "decorators": true } -} \ 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..2a3b127804 100644 --- a/test/fixtures/experimental/uncategorised/36/options.json +++ b/test/fixtures/experimental/uncategorised/36/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.decorators": true + "decorators": true } -} \ 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..2a3b127804 100644 --- a/test/fixtures/experimental/uncategorised/37/options.json +++ b/test/fixtures/experimental/uncategorised/37/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.decorators": true + "decorators": true } -} \ 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..2a3b127804 100644 --- a/test/fixtures/experimental/uncategorised/38/options.json +++ b/test/fixtures/experimental/uncategorised/38/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.decorators": true + "decorators": true } -} \ 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..2a3b127804 100644 --- a/test/fixtures/experimental/uncategorised/39/options.json +++ b/test/fixtures/experimental/uncategorised/39/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.decorators": true + "decorators": true } -} \ 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..41c7f66605 100644 --- a/test/fixtures/experimental/uncategorised/4/options.json +++ b/test/fixtures/experimental/uncategorised/4/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.exponentiationOperator": true + "exponentiationOperator": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/40/options.json b/test/fixtures/experimental/uncategorised/40/options.json index 27f5622b68..2a3b127804 100644 --- a/test/fixtures/experimental/uncategorised/40/options.json +++ b/test/fixtures/experimental/uncategorised/40/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.decorators": true + "decorators": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/41/options.json b/test/fixtures/experimental/uncategorised/41/options.json index 182e2604d5..b433f712de 100644 --- a/test/fixtures/experimental/uncategorised/41/options.json +++ b/test/fixtures/experimental/uncategorised/41/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.decorators": true + "decorators": true }, "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..821f4be393 100644 --- a/test/fixtures/experimental/uncategorised/42/options.json +++ b/test/fixtures/experimental/uncategorised/42/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.decorators": true + "decorators": true }, "throws": "You have trailing decorators with no method (1:18)" -} \ 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..bbe898f093 100644 --- a/test/fixtures/experimental/uncategorised/43/options.json +++ b/test/fixtures/experimental/uncategorised/43/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.classProperties": true + "classProperties": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/44/options.json b/test/fixtures/experimental/uncategorised/44/options.json index fde5b42bd7..bbe898f093 100644 --- a/test/fixtures/experimental/uncategorised/44/options.json +++ b/test/fixtures/experimental/uncategorised/44/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.classProperties": true + "classProperties": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/45/options.json b/test/fixtures/experimental/uncategorised/45/options.json index fde5b42bd7..bbe898f093 100644 --- a/test/fixtures/experimental/uncategorised/45/options.json +++ b/test/fixtures/experimental/uncategorised/45/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.classProperties": true + "classProperties": true } -} \ 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..bbe898f093 100644 --- a/test/fixtures/experimental/uncategorised/46/options.json +++ b/test/fixtures/experimental/uncategorised/46/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.classProperties": true + "classProperties": true } -} \ 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..860a7f5c18 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 + "classProperties": true, + "decorators": true } -} \ 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..860a7f5c18 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 + "classProperties": true, + "decorators": true } -} \ 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..2a3b127804 100644 --- a/test/fixtures/experimental/uncategorised/49/options.json +++ b/test/fixtures/experimental/uncategorised/49/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.decorators": true + "decorators": true } -} \ 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..41c7f66605 100644 --- a/test/fixtures/experimental/uncategorised/5/options.json +++ b/test/fixtures/experimental/uncategorised/5/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.exponentiationOperator": true + "exponentiationOperator": true } -} \ 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..0f9c04fc1c 100644 --- a/test/fixtures/experimental/uncategorised/50/options.json +++ b/test/fixtures/experimental/uncategorised/50/options.json @@ -1,6 +1,6 @@ { "sourceType": "module", "features": { - "es7.exportExtensions": true + "exportExtensions": true } -} \ 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..0f9c04fc1c 100644 --- a/test/fixtures/experimental/uncategorised/51/options.json +++ b/test/fixtures/experimental/uncategorised/51/options.json @@ -1,6 +1,6 @@ { "sourceType": "module", "features": { - "es7.exportExtensions": true + "exportExtensions": true } -} \ 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..0f9c04fc1c 100644 --- a/test/fixtures/experimental/uncategorised/52/options.json +++ b/test/fixtures/experimental/uncategorised/52/options.json @@ -1,6 +1,6 @@ { "sourceType": "module", "features": { - "es7.exportExtensions": true + "exportExtensions": true } -} \ 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..0f9c04fc1c 100644 --- a/test/fixtures/experimental/uncategorised/53/options.json +++ b/test/fixtures/experimental/uncategorised/53/options.json @@ -1,6 +1,6 @@ { "sourceType": "module", "features": { - "es7.exportExtensions": true + "exportExtensions": true } -} \ 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..0f9c04fc1c 100644 --- a/test/fixtures/experimental/uncategorised/54/options.json +++ b/test/fixtures/experimental/uncategorised/54/options.json @@ -1,6 +1,6 @@ { "sourceType": "module", "features": { - "es7.exportExtensions": true + "exportExtensions": true } -} \ 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..5e058ad445 100644 --- a/test/fixtures/experimental/uncategorised/55/options.json +++ b/test/fixtures/experimental/uncategorised/55/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.trailingFunctionCommas": true + "trailingFunctionCommas": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/56/options.json b/test/fixtures/experimental/uncategorised/56/options.json index 6c4b46d000..5e058ad445 100644 --- a/test/fixtures/experimental/uncategorised/56/options.json +++ b/test/fixtures/experimental/uncategorised/56/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.trailingFunctionCommas": true + "trailingFunctionCommas": true } -} \ 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..5e058ad445 100644 --- a/test/fixtures/experimental/uncategorised/57/options.json +++ b/test/fixtures/experimental/uncategorised/57/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.trailingFunctionCommas": true + "trailingFunctionCommas": true } -} \ 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..5e058ad445 100644 --- a/test/fixtures/experimental/uncategorised/58/options.json +++ b/test/fixtures/experimental/uncategorised/58/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.trailingFunctionCommas": true + "trailingFunctionCommas": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/59/options.json b/test/fixtures/experimental/uncategorised/59/options.json index 0ed6fd677f..62be2d0a68 100644 --- a/test/fixtures/experimental/uncategorised/59/options.json +++ b/test/fixtures/experimental/uncategorised/59/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.trailingFunctionCommas": true + "trailingFunctionCommas": true }, "throws": "Unexpected token (1:4)" -} \ 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..41c7f66605 100644 --- a/test/fixtures/experimental/uncategorised/6/options.json +++ b/test/fixtures/experimental/uncategorised/6/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.exponentiationOperator": true + "exponentiationOperator": true } -} \ No newline at end of file +} diff --git a/test/fixtures/experimental/uncategorised/60/options.json b/test/fixtures/experimental/uncategorised/60/options.json index 102842d3a2..01d373f173 100644 --- a/test/fixtures/experimental/uncategorised/60/options.json +++ b/test/fixtures/experimental/uncategorised/60/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.trailingFunctionCommas": true + "trailingFunctionCommas": true }, "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..26872c0003 100644 --- a/test/fixtures/experimental/uncategorised/61/options.json +++ b/test/fixtures/experimental/uncategorised/61/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.trailingFunctionCommas": true + "trailingFunctionCommas": true }, "throws": "Unexpected token (1:7)" -} \ 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..2a3b127804 100644 --- a/test/fixtures/experimental/uncategorised/62/options.json +++ b/test/fixtures/experimental/uncategorised/62/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.decorators": true + "decorators": true } } diff --git a/test/fixtures/experimental/uncategorised/7/options.json b/test/fixtures/experimental/uncategorised/7/options.json index 875943b10b..41c7f66605 100644 --- a/test/fixtures/experimental/uncategorised/7/options.json +++ b/test/fixtures/experimental/uncategorised/7/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.exponentiationOperator": true + "exponentiationOperator": true } -} \ 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..41c7f66605 100644 --- a/test/fixtures/experimental/uncategorised/8/options.json +++ b/test/fixtures/experimental/uncategorised/8/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.exponentiationOperator": true + "exponentiationOperator": true } -} \ 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..7fd805ebbe 100644 --- a/test/fixtures/experimental/uncategorised/9/options.json +++ b/test/fixtures/experimental/uncategorised/9/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.objectRestSpread": true + "objectRestSpread": true } -} \ No newline at end of file +} diff --git a/test/fixtures/flow/options.json b/test/fixtures/flow/options.json index c1331af184..05a90ee573 100644 --- a/test/fixtures/flow/options.json +++ b/test/fixtures/flow/options.json @@ -1,5 +1,5 @@ { "sourceType": "module", "plugins": { "jsx": true, "flow": true }, - "features": { "es7.asyncFunctions": true } + "features": { "asyncFunctions": true } } diff --git a/test/fixtures/harmony/uncategorised/269/options.json b/test/fixtures/harmony/uncategorised/269/options.json index f271f6ed7a..880504f34d 100644 --- a/test/fixtures/harmony/uncategorised/269/options.json +++ b/test/fixtures/harmony/uncategorised/269/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.comprehensions": true + "comprehensions": true }, "throws": "Unexpected token (1:6)" -} \ No newline at end of file +} diff --git a/test/fixtures/harmony/uncategorised/270/options.json b/test/fixtures/harmony/uncategorised/270/options.json index f271f6ed7a..880504f34d 100644 --- a/test/fixtures/harmony/uncategorised/270/options.json +++ b/test/fixtures/harmony/uncategorised/270/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.comprehensions": true + "comprehensions": true }, "throws": "Unexpected token (1:6)" -} \ No newline at end of file +} diff --git a/test/fixtures/harmony/uncategorised/271/options.json b/test/fixtures/harmony/uncategorised/271/options.json index f271f6ed7a..880504f34d 100644 --- a/test/fixtures/harmony/uncategorised/271/options.json +++ b/test/fixtures/harmony/uncategorised/271/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.comprehensions": true + "comprehensions": true }, "throws": "Unexpected token (1:6)" -} \ No newline at end of file +} diff --git a/test/fixtures/harmony/uncategorised/272/options.json b/test/fixtures/harmony/uncategorised/272/options.json index cd9f37a180..dad599c3b8 100644 --- a/test/fixtures/harmony/uncategorised/272/options.json +++ b/test/fixtures/harmony/uncategorised/272/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.comprehensions": true + "comprehensions": true }, "throws": "Unexpected token (1:8)" -} \ No newline at end of file +} diff --git a/test/fixtures/harmony/uncategorised/274/options.json b/test/fixtures/harmony/uncategorised/274/options.json index cbddd68bb9..9b7c4355a5 100644 --- a/test/fixtures/harmony/uncategorised/274/options.json +++ b/test/fixtures/harmony/uncategorised/274/options.json @@ -1,6 +1,6 @@ { "features": { - "es7.comprehensions": true + "comprehensions": true }, "throws": "Unexpected token (1:14)" -} \ No newline at end of file +} diff --git a/test/fixtures/harmony/uncategorised/57/options.json b/test/fixtures/harmony/uncategorised/57/options.json index 8d84badefb..142b9fa2a0 100644 --- a/test/fixtures/harmony/uncategorised/57/options.json +++ b/test/fixtures/harmony/uncategorised/57/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.comprehensions": true + "comprehensions": true } } diff --git a/test/fixtures/harmony/uncategorised/58/options.json b/test/fixtures/harmony/uncategorised/58/options.json index 8d84badefb..142b9fa2a0 100644 --- a/test/fixtures/harmony/uncategorised/58/options.json +++ b/test/fixtures/harmony/uncategorised/58/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.comprehensions": true + "comprehensions": true } } diff --git a/test/fixtures/harmony/uncategorised/59/options.json b/test/fixtures/harmony/uncategorised/59/options.json index 8d84badefb..142b9fa2a0 100644 --- a/test/fixtures/harmony/uncategorised/59/options.json +++ b/test/fixtures/harmony/uncategorised/59/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.comprehensions": true + "comprehensions": true } } diff --git a/test/fixtures/harmony/uncategorised/60/options.json b/test/fixtures/harmony/uncategorised/60/options.json index 8d84badefb..142b9fa2a0 100644 --- a/test/fixtures/harmony/uncategorised/60/options.json +++ b/test/fixtures/harmony/uncategorised/60/options.json @@ -1,5 +1,5 @@ { "features": { - "es7.comprehensions": true + "comprehensions": true } } From 59948c66494c8d69b68bef9aab3dd3be22a5c7a3 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:15:19 +0100 Subject: [PATCH 12/31] add babylon hasFeature util method --- src/parser/statement.js | 16 ++++++++-------- src/tokenizer/index.js | 4 ++-- src/tokenizer/state.js | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/parser/statement.js b/src/parser/statement.js index 614951c802..9f96ccf826 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -96,7 +96,7 @@ pp.parseStatement = function (declaration, topLevel) { 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.hasFeature("asyncFunctions") && this.state.value === "async") { // peek ahead and see if next token is a function let state = this.state.clone(); this.next(); @@ -145,7 +145,7 @@ pp.parseDecorators = function (allowExport) { }; pp.parseDecorator = function () { - if (!this.options.features["es7.decorators"]) { + if (!this.hasFeature("decorators")) { this.unexpected(); } let node = this.startNode(); @@ -511,7 +511,7 @@ pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, op 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.hasFeature("trailingFunctionCommas")); }; // Parse a class declaration or literal (depending on the @@ -550,7 +550,7 @@ pp.parseClass = function (node, isStatement, optionalId) { classBody.body.push(this.parseClassProperty(method)); continue; } - if (this.options.features["es7.asyncFunctions"] && !this.match(tt.parenL) && + if (this.hasFeature("asyncFunctions") && !this.match(tt.parenL) && !method.computed && method.key.type === "Identifier" && method.key.name === "async") { isAsync = true; this.parsePropertyName(method); @@ -605,7 +605,7 @@ pp.isClassProperty = function () { pp.parseClassProperty = function (node) { if (this.match(tt.eq)) { - if (!this.options.features["es7.classProperties"]) this.unexpected(); + if (!this.hasFeature("classProperties")) this.unexpected(); this.next(); node.value = this.parseMaybeAssign(); } else { @@ -644,7 +644,7 @@ pp.parseExport = function (node) { if (this.match(tt.star)) { let specifier = this.startNode(); this.next(); - if (this.options.features["es7.exportExtensions"] && this.eatContextual("as")) { + if (this.hasFeature("exportExtensions") && this.eatContextual("as")) { specifier.exported = this.parseIdentifier(); node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; this.parseExportSpecifiersMaybe(node); @@ -653,7 +653,7 @@ 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.hasFeature("exportExtensions") && this.isExportDefaultSpecifier()) { let specifier = this.startNode(); specifier.exported = this.parseIdentifier(true); node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; @@ -735,7 +735,7 @@ pp.parseExportFrom = function (node, expect?) { }; pp.shouldParseExportDeclaration = function () { - return this.options.features["es7.asyncFunctions"] && this.isContextual("async"); + return this.hasFeature("asyncFunctions") && this.isContextual("async"); }; pp.checkExport = function (node) { diff --git a/src/tokenizer/index.js b/src/tokenizer/index.js index b1b4f16f0d..3839f81e58 100644 --- a/src/tokenizer/index.js +++ b/src/tokenizer/index.js @@ -308,7 +308,7 @@ export default class Tokenizer { var width = 1; var next = this.input.charCodeAt(this.state.pos + 1); - if (next === 42 && this.options.features["es7.exponentiationOperator"]) { // '*' + if (next === 42 && this.hasFeature("exponentiationOperator")) { // '*' width++; next = this.input.charCodeAt(this.state.pos + 2); type = tt.exponent; @@ -411,7 +411,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.hasFeature("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { return this.finishOp(tt.doubleColon, 2); } else { ++this.state.pos; diff --git a/src/tokenizer/state.js b/src/tokenizer/state.js index 4765017de3..b5a846ae20 100644 --- a/src/tokenizer/state.js +++ b/src/tokenizer/state.js @@ -60,7 +60,6 @@ export default class State { // 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; return this; From 415752dbb7356c1964949509611f68ff99f24779 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:16:07 +0100 Subject: [PATCH 13/31] add directives property to Program and BlockStatement --- src/parser/statement.js | 65 ++++++++++++++++++++++++++--------------- src/parser/util.js | 6 ---- 2 files changed, 42 insertions(+), 29 deletions(-) diff --git a/src/parser/statement.js b/src/parser/statement.js index 9f96ccf826..536db0a82c 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -13,18 +13,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, tt.eof); file.program = this.finishNode(program, "Program"); file.comments = this.state.comments; @@ -35,6 +25,16 @@ pp.parseTopLevel = function (file, program) { const loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; +// TODO + +pp.parseDirective = function () { + let node = this.startNode(); + node.raw = this.input.slice(this.state.start, this.state.end); + node.value = node.raw.slice(1, -1); // remove quotes + this.next(); + return this.finishNode(node, "Directive"); +}; + // Parse a single statement. // // If expecting a statement and finding a slash operator, parse a @@ -415,22 +415,41 @@ pp.parseExpressionStatement = function (node, expr) { // function bodies). pp.parseBlock = function (allowStrict) { - let node = this.startNode(), first = true, oldStrict; - node.body = []; + 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.state.strict; - this.setStrict(this.state.strict = true); - } - first = false; - } - if (oldStrict === false) this.setStrict(false); + this.parseBlockBody(node, allowStrict, tt.braceR); return this.finishNode(node, "BlockStatement"); }; +// TODO + +pp.parseBlockBody = function (node, allowStrict, end) { + node.body = []; + node.directives = []; + + let parsedNonDirective = false; + let oldStrict; + + while (!this.eat(end)) { + if (!parsedNonDirective && this.match(tt.string)) { + let stmt = this.parseDirective(); + node.directives.push(stmt); + + if (allowStrict && stmt.value === "use strict") { + oldStrict = this.state.strict; + this.setStrict(this.state.strict = true); + } + } else { + parsedNonDirective = true; + node.body.push(this.parseStatement(true)); + } + } + + 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. diff --git a/src/parser/util.js b/src/parser/util.js index 29cdc074c6..2b1dd9e1b2 100644 --- a/src/parser/util.js +++ b/src/parser/util.js @@ -6,12 +6,6 @@ const pp = Parser.prototype; // ## Parser utilities -// Test whether a statement node is the string literal `"use strict"`. - -pp.isUseStrict = function (stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && stmt.expression.raw.slice(1, -1) === "use strict"; -}; - // TODO pp.isRelational = function (op) { From c892cae6af644340fdeebfbc1b17eafae15a4144 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:16:46 +0100 Subject: [PATCH 14/31] use hasFeature rather than directly looking up options --- src/parser/expression.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/parser/expression.js b/src/parser/expression.js index 96ce489e71..d38d50ea27 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -253,7 +253,7 @@ pp.parseSubscripts = function(base, startPos, startLoc, noCalls) { let node = this.startNodeAt(startPos, startLoc); node.callee = base; - node.arguments = this.parseCallExpressionArguments(tt.parenR, this.options.features["es7.trailingFunctionCommas"], possibleAsync); + node.arguments = this.parseCallExpressionArguments(tt.parenR, this.hasFeature("trailingFunctionCommas"), possibleAsync); base = this.finishNode(node, "CallExpression"); if (possibleAsync && this.shouldParseAsyncArrow()) { @@ -305,7 +305,7 @@ pp.shouldParseAsyncArrow = function () { }; pp.parseAsyncArrowFromCallExpression = function (node, call) { - if (!this.options.features["es7.asyncFunctions"]) this.unexpected(); + if (!this.hasFeature("asyncFunctions")) this.unexpected(); this.expect(tt.arrow); return this.parseArrowExpression(node, call.arguments, true); }; @@ -349,7 +349,7 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { node = this.startNode(); let id = this.parseIdentifier(true); - if (this.options.features["es7.asyncFunctions"]) { + if (this.hasFeature("asyncFunctions")) { if (id.name === "await") { if (this.inAsync) return this.parseAwait(node); } else if (id.name === "async" && this.match(tt._function) && !this.canInsertSemicolon()) { @@ -370,7 +370,7 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { return id; case tt._do: - if (this.options.features["es7.doExpressions"]) { + if (this.hasFeature("doExpressions")) { let node = this.startNode(); this.next(); var oldInFunction = this.state.inFunction; @@ -415,7 +415,7 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { node = this.startNode(); this.next(); // check whether this is array comprehension or regular array - if (this.options.features["es7.comprehensions"] && this.match(tt._for)) { + if (this.hasFeature("comprehensions") && this.match(tt._for)) { return this.parseComprehension(node, false); } node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos); @@ -481,7 +481,7 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow let val; this.next(); - if (this.options.features["es7.comprehensions"] && this.match(tt._for)) { + if (this.hasFeature("comprehensions") && this.match(tt._for)) { return this.parseComprehension(this.startNodeAt(startPos, startLoc), true); } @@ -493,7 +493,7 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow first = false; } else { this.expect(tt.comma); - if (this.match(tt.parenR) && this.options.features["es7.trailingFunctionCommas"]) { + if (this.match(tt.parenR) && this.hasFeature("trailingFunctionCommas")) { optionalCommaStart = this.state.start; break; } @@ -571,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.hasFeature("trailingFunctionCommas")); this.toReferencedList(node.arguments); } else { node.arguments = []; @@ -633,7 +633,7 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) { prop.decorators = decorators; decorators = []; } - if (this.options.features["es7.objectRestSpread"] && this.match(tt.ellipsis)) { + if (this.hasFeature("objectRestSpread") && this.match(tt.ellipsis)) { prop = this.parseSpread(); prop.type = "SpreadProperty"; node.properties.push(prop); @@ -648,7 +648,7 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) { if (!isPattern) { isGenerator = this.eat(tt.star); } - if (!isPattern && this.options.features["es7.asyncFunctions"] && this.isContextual("async")) { + if (!isPattern && this.hasFeature("asyncFunctions") && this.isContextual("async")) { if (isGenerator) this.unexpected(); var asyncId = this.parseIdentifier(); if (this.match(tt.colon) || this.match(tt.parenL) || this.match(tt.braceR)) { @@ -736,7 +736,7 @@ pp.initFunction = function (node, isAsync) { node.id = null; node.generator = false; node.expression = false; - if (this.options.features["es7.asyncFunctions"]) { + if (this.hasFeature("asyncFunctions")) { node.async = !!isAsync; } }; @@ -747,7 +747,7 @@ pp.parseMethod = function (isGenerator, isAsync) { let node = this.startNode(); 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.hasFeature("trailingFunctionCommas")); node.generator = isGenerator; this.parseFunctionBody(node); return this.finishNode(node, "FunctionExpression"); From c5e2e4d39e88feb24c129bef00ef9394a81bdef0 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:16:57 +0100 Subject: [PATCH 15/31] loop over all directives to check for use strict --- src/parser/expression.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/parser/expression.js b/src/parser/expression.js index d38d50ea27..391981ae28 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -793,9 +793,14 @@ pp.parseFunctionBody = function (node, allowExpression) { if (allowExpression) checkLVal = true; // normal function - if (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { - checkLVal = true; - checkLValStrict = true; + if (!isExpression && node.body.directives.length) { + for (var directive of (node.body.directives: Array)) { + if (directive.value === "use strict") { + checkLVal = true; + checkLValStrict = true; + break; + } + } } if (checkLVal) { From 54a4f16b08974877b0080d3c316355343bdbd712 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:17:45 +0100 Subject: [PATCH 16/31] add RestProperty node --- src/parser/expression.js | 2 +- src/parser/lval.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser/expression.js b/src/parser/expression.js index 391981ae28..e819ed1b71 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -635,7 +635,7 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) { } if (this.hasFeature("objectRestSpread") && this.match(tt.ellipsis)) { prop = this.parseSpread(); - prop.type = "SpreadProperty"; + prop.type = isPattern ? "RestProperty" : "SpreadProperty"; node.properties.push(prop); continue; } diff --git a/src/parser/lval.js b/src/parser/lval.js index 0d477fd10c..d3d4569611 100644 --- a/src/parser/lval.js +++ b/src/parser/lval.js @@ -202,7 +202,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; From 9e264e70ae483917d694c4840392d34327d1b12f Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:18:04 +0100 Subject: [PATCH 17/31] only allow identifiers as rest expressions --- src/parser/lval.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/parser/lval.js b/src/parser/lval.js index d3d4569611..07e4db70db 100644 --- a/src/parser/lval.js +++ b/src/parser/lval.js @@ -92,22 +92,17 @@ pp.parseSpread = function (refShorthandDefaultPos) { pp.parseRest = function () { let node = this.startNode(); this.next(); - if (this.match(tt.name) || this.match(tt.bracketL)) { - node.argument = this.parseBindingAtom(); - } else { - this.unexpected(); - } + node.argument = this.parseIdentifier(); return this.finishNode(node, "RestElement"); }; // Parses lvalue (assignable) atom. pp.parseBindingAtom = function () { - if (this.match(tt.name)) { - return this.parseIdentifier(true); - } - switch (this.state.type) { + case tt.name: + return this.parseIdentifier(true); + case tt.bracketL: let node = this.startNode(); this.next(); From 40aab69ed0c05a9326f0c0b1c0f84ede75916c32 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:18:15 +0100 Subject: [PATCH 18/31] remove weird acorn conditional formatting --- src/parser/lval.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/parser/lval.js b/src/parser/lval.js index 07e4db70db..cb8cae285a 100644 --- a/src/parser/lval.js +++ b/src/parser/lval.js @@ -120,8 +120,11 @@ pp.parseBindingAtom = function () { pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { var elts = [], 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)) { From d1ecb04d0f9a64d9fedcff10cd042f83cd16753f Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:18:23 +0100 Subject: [PATCH 19/31] add hasFeature util method --- src/parser/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parser/index.js b/src/parser/index.js index 80db85a465..d0752f5af1 100644 --- a/src/parser/index.js +++ b/src/parser/index.js @@ -25,6 +25,10 @@ export default class Parser extends Tokenizer { } } + hasFeature(name) { + return !!this.options.features[name]; + } + extend(name, f) { this[name] = f(this[name]); } From bf841c7e2798a71ecd772d70b4648a5b2be325fc Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:19:26 +0100 Subject: [PATCH 20/31] use extra.parenthesized rather than parenthesizedExpression --- src/parser/expression.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/parser/expression.js b/src/parser/expression.js index e819ed1b71..786b094a25 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -109,7 +109,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)`"; @@ -540,8 +540,7 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow } else { val = exprList[0]; } - - val.parenthesizedExpression = true; + this.addExtra(val, "parenthesized", true); return val; }; From e8fa03ea1cace7a556cb4081e62218afc9476cca Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:19:35 +0100 Subject: [PATCH 21/31] add parser util addExtra method --- src/parser/util.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/parser/util.js b/src/parser/util.js index 2b1dd9e1b2..2719607626 100644 --- a/src/parser/util.js +++ b/src/parser/util.js @@ -8,6 +8,15 @@ const pp = Parser.prototype; // TODO +pp.addExtra = function (node, key, val) { + if (!node) return; + + var extra = node.extra = node.extra || {}; + extra[key] = val; +}; + +// TODO + pp.isRelational = function (op) { return this.match(tt.relational) && this.state.value === op; }; From fc87af4c81d8def6d8c4c2357a18895cb8c2ed68 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:19:49 +0100 Subject: [PATCH 22/31] add dead simple babylon bin --- bin/babylon.js | 15 +++++++++++++++ package.json | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 bin/babylon.js 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 32b7162915..497f045c00 100644 --- a/package.json +++ b/package.json @@ -7,4 +7,6 @@ "license": "MIT", "repository": "babel/babel", "main": "lib/index.js" -} \ No newline at end of file +} "bin": { + "babylon": "./bin/babylon.js" + } From 446cc3e86948eefb4c372126a88b87b52ad75241 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:20:03 +0100 Subject: [PATCH 23/31] add babylon description --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 497f045c00..1d483b27e1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "babylon", "version": "5.8.23", - "description": "", + "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", "license": "MIT", From f3a016df309a84d5f52d43d39b23b93b053fa820 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:20:21 +0100 Subject: [PATCH 24/31] add babel-runtime to babylon dependencies --- package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1d483b27e1..0a2151b37d 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,11 @@ "homepage": "https://babeljs.io/", "license": "MIT", "repository": "babel/babel", - "main": "lib/index.js" -} "bin": { + "main": "lib/index.js", + "dependencies": { + "babel-runtime": "^5.8.20" + }, + "bin": { "babylon": "./bin/babylon.js" } +} From 0612f691419bd4e6d830db97431bf4bcd42a2eb0 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:25:52 +0100 Subject: [PATCH 25/31] flesh out babylon readme --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 25edcd9a74..12fee1e55f 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,70 @@ 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. + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. + +- **features**: Object containing names of all the proposed syntax you want + to support. + +- **plugins**: Object containg 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: true + } + + plugins: { + // enable jsx and flow syntax + jsx: true, + flow: true + } +}); +``` + +### Features + + - `asyncFunctions` + - `doExpressions` + - `comprehensions` + - `trailingFunctionCommas` + - `objectRestSpread` + - `decorators` + +### Plugins + + - `jsx` + - `flow` From 6d6ddf0bcd9b9f68a0a48e7b7d11b8d2e561f381 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 23 Sep 2015 15:59:41 +0100 Subject: [PATCH 26/31] type annotate babylon --- src/index.js | 2 + src/options.js | 4 +- src/parser/comments.js | 2 + src/parser/expression.js | 6 ++- src/parser/index.js | 16 +++++-- src/parser/location.js | 2 + src/parser/lval.js | 8 ++-- src/parser/node.js | 17 ++++--- src/parser/statement.js | 4 +- src/parser/util.js | 2 + src/plugins/flow.js | 2 + src/plugins/jsx/index.js | 2 + src/tokenizer/context.js | 14 +++++- src/tokenizer/index.js | 14 +++--- src/tokenizer/state.js | 96 ++++++++++++++++++++++++++++++---------- src/tokenizer/types.js | 2 + src/util/identifier.js | 2 + src/util/location.js | 2 + src/util/whitespace.js | 2 + 19 files changed, 154 insertions(+), 45 deletions(-) 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 f33e39d920..3b97f93a63 100755 --- a/src/options.js +++ b/src/options.js @@ -1,3 +1,5 @@ +/* @flow */ + // A second optional argument can be given to further configure // the parser process. These options are recognized: @@ -18,7 +20,7 @@ export const defaultOptions = { // 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..5a3e96abcc 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. * diff --git a/src/parser/expression.js b/src/parser/expression.js index 786b094a25..8c9898429c 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 @@ -793,7 +795,7 @@ pp.parseFunctionBody = function (node, allowExpression) { // normal function if (!isExpression && node.body.directives.length) { - for (var directive of (node.body.directives: Array)) { + for (var directive of (node.body.directives: Array)) { if (directive.value === "use strict") { checkLVal = true; checkLValStrict = true; @@ -809,7 +811,7 @@ pp.parseFunctionBody = function (node, allowExpression) { 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.state.strict = oldStrict; diff --git a/src/parser/index.js b/src/parser/index.js index d0752f5af1..59dd256bae 100644 --- a/src/parser/index.js +++ b/src/parser/index.js @@ -1,3 +1,5 @@ +/* @flow */ + import { reservedWords } from "../util/identifier"; import { getOptions } from "../options"; import Tokenizer from "../tokenizer"; @@ -7,7 +9,7 @@ import Tokenizer from "../tokenizer"; export const plugins = {}; export default class Parser extends Tokenizer { - constructor(options, input) { + constructor(options, input: string) { options = getOptions(options); super(options, input); @@ -25,11 +27,11 @@ export default class Parser extends Tokenizer { } } - hasFeature(name) { + hasFeature(name: string): boolean { return !!this.options.features[name]; } - extend(name, f) { + extend(name: string, f: Function) { this[name] = f(this[name]); } @@ -41,7 +43,13 @@ export default class Parser extends Tokenizer { } } - 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 cb8cae285a..333b6457b8 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,7 +20,7 @@ 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); @@ -184,14 +186,14 @@ pp.checkLVal = function (expr, isBinding, checkClashes) { break; case "ObjectPattern": - for (let prop of (expr.properties: Array)) { + for (let prop of (expr.properties: Array)) { if (prop.type === "Property") 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; diff --git a/src/parser/node.js b/src/parser/node.js index 7fb0cd2a62..d3544bc816 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,15 +7,20 @@ 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() { + type: string; + start: ?number; + end: number; + loc: SourceLocation; + + __clone(): Node { var node2 = new Node; for (var key in this) node2[key] = this[key]; return node2; @@ -21,11 +28,11 @@ export class Node { } 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 536db0a82c..14cc0daa40 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"; @@ -380,7 +382,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`); } diff --git a/src/parser/util.js b/src/parser/util.js index 2719607626..e20e2467c9 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"; diff --git a/src/plugins/flow.js b/src/plugins/flow.js index ea58d81aae..7fe1d97d19 100644 --- a/src/plugins/flow.js +++ b/src/plugins/flow.js @@ -1,3 +1,5 @@ +/* @flow */ + import { types as tt } from "../tokenizer/types"; import Parser from "../parser"; diff --git a/src/plugins/jsx/index.js b/src/plugins/jsx/index.js index b6ae663bee..c373f88b8d 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"; 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 3839f81e58..535fd5b856 100644 --- a/src/tokenizer/index.js +++ b/src/tokenizer/index.js @@ -1,3 +1,6 @@ +/* @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"; @@ -18,9 +21,11 @@ export class Token { this.loc = new SourceLocation(state.startLoc, state.endLoc); } - get range() { - return [this.start, this.end]; - } + type: TokenType; + value: any; + start: number; + end: number; + loc: SourceLocation; } // ## Tokenizer @@ -162,8 +167,7 @@ export default class Tokenizer { value: text, start: start, end: end, - loc: new SourceLocation(startLoc, endLoc), - range: [start, end] + loc: new SourceLocation(startLoc, endLoc) }; if (!this.isLookahead) { diff --git a/src/tokenizer/state.js b/src/tokenizer/state.js index b5a846ae20..b536a1fd8a 100644 --- a/src/tokenizer/state.js +++ b/src/tokenizer/state.js @@ -1,70 +1,120 @@ +/* @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(options, input) { - // strict + 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; - // 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; 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; + + // 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; + curPosition() { return new Position(this.curLine, this.pos - this.lineStart); } diff --git a/src/tokenizer/types.js b/src/tokenizer/types.js index d64407e920..90b60f4ca2 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 diff --git a/src/util/identifier.js b/src/util/identifier.js index 48847c6277..947e993ade 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 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. From 9908dc6f50159bc12ad0c0aada83c91861b32730 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 5 Oct 2015 16:40:43 +0100 Subject: [PATCH 27/31] update babylon tests --- .../block-trailing-comment/expected.json | 18 +- .../comment-within-condition/expected.json | 30 +- .../expected.json | 32 +- .../surrounding-call-comments/expected.json | 30 +- .../expected.json | 30 +- .../surrounding-return-comments/expected.json | 30 +- .../surrounding-throw-comments/expected.json | 36 +- .../expected.json | 39 +- .../expected.json | 48 +-- .../switch-fallthrough-comment/expected.json | 45 +-- .../expected.json | 34 +- .../expected.json | 45 +-- .../switch-no-default-comment/expected.json | 23 +- .../regex-after-block/expected.json | 14 +- .../core/uncategorised/10/expected.json | 11 +- .../core/uncategorised/100/expected.json | 17 +- .../core/uncategorised/101/expected.json | 17 +- .../core/uncategorised/102/expected.json | 7 +- .../core/uncategorised/103/expected.json | 7 +- .../core/uncategorised/104/expected.json | 7 +- .../core/uncategorised/105/expected.json | 7 +- .../core/uncategorised/106/expected.json | 7 +- .../core/uncategorised/107/expected.json | 7 +- .../core/uncategorised/108/expected.json | 7 +- .../core/uncategorised/11/expected.json | 11 +- .../core/uncategorised/116/expected.json | 7 +- .../core/uncategorised/118/expected.json | 7 +- .../core/uncategorised/12/expected.json | 27 +- .../core/uncategorised/124/expected.json | 11 +- .../core/uncategorised/125/expected.json | 11 +- .../core/uncategorised/126/expected.json | 35 +- .../core/uncategorised/127/expected.json | 11 +- .../core/uncategorised/13/expected.json | 27 +- .../core/uncategorised/197/expected.json | 19 +- .../core/uncategorised/198/expected.json | 19 +- .../core/uncategorised/199/expected.json | 11 +- .../core/uncategorised/200/expected.json | 11 +- .../core/uncategorised/201/expected.json | 11 +- .../core/uncategorised/202/expected.json | 11 +- .../core/uncategorised/203/expected.json | 11 +- .../core/uncategorised/204/expected.json | 11 +- .../core/uncategorised/205/expected.json | 11 +- .../core/uncategorised/206/expected.json | 11 +- .../core/uncategorised/207/expected.json | 11 +- .../core/uncategorised/208/expected.json | 11 +- .../core/uncategorised/209/expected.json | 11 +- .../core/uncategorised/210/expected.json | 11 +- .../core/uncategorised/211/expected.json | 11 +- .../core/uncategorised/212/expected.json | 11 +- .../core/uncategorised/218/expected.json | 11 +- .../core/uncategorised/219/expected.json | 19 +- .../core/uncategorised/22/expected.json | 11 +- .../core/uncategorised/220/expected.json | 27 +- .../core/uncategorised/229/expected.json | 10 +- .../core/uncategorised/23/expected.json | 11 +- .../core/uncategorised/230/expected.json | 11 +- .../core/uncategorised/232/expected.json | 7 +- .../core/uncategorised/233/expected.json | 7 +- .../core/uncategorised/234/expected.json | 14 +- .../core/uncategorised/235/expected.json | 17 +- .../core/uncategorised/236/expected.json | 7 +- .../core/uncategorised/237/expected.json | 14 +- .../core/uncategorised/24/expected.json | 11 +- .../core/uncategorised/240/expected.json | 11 +- .../core/uncategorised/241/expected.json | 11 +- .../core/uncategorised/242/expected.json | 19 +- .../core/uncategorised/243/expected.json | 19 +- .../core/uncategorised/244/expected.json | 19 +- .../core/uncategorised/245/expected.json | 19 +- .../core/uncategorised/25/expected.json | 11 +- .../core/uncategorised/250/expected.json | 10 +- .../core/uncategorised/251/expected.json | 10 +- .../core/uncategorised/252/expected.json | 10 +- .../core/uncategorised/253/expected.json | 10 +- .../core/uncategorised/254/expected.json | 10 +- .../core/uncategorised/255/expected.json | 10 +- .../core/uncategorised/256/expected.json | 10 +- .../core/uncategorised/259/expected.json | 10 +- .../core/uncategorised/26/expected.json | 11 +- .../core/uncategorised/260/expected.json | 10 +- .../core/uncategorised/261/expected.json | 10 +- .../core/uncategorised/262/expected.json | 10 +- .../core/uncategorised/269/expected.json | 11 +- .../core/uncategorised/27/expected.json | 19 +- .../core/uncategorised/270/expected.json | 11 +- .../core/uncategorised/272/expected.json | 7 +- .../core/uncategorised/275/expected.json | 11 +- .../core/uncategorised/28/expected.json | 19 +- .../core/uncategorised/288/expected.json | 10 +- .../core/uncategorised/289/expected.json | 21 +- .../core/uncategorised/299/expected.json | 10 +- .../core/uncategorised/3/expected.json | 11 +- .../core/uncategorised/302/expected.json | 29 +- .../core/uncategorised/303/expected.json | 22 +- .../core/uncategorised/304/expected.json | 10 +- .../core/uncategorised/305/expected.json | 28 +- .../core/uncategorised/306/expected.json | 28 +- .../core/uncategorised/307/expected.json | 10 +- .../core/uncategorised/308/expected.json | 28 +- .../core/uncategorised/309/expected.json | 28 +- .../core/uncategorised/310/expected.json | 10 +- .../core/uncategorised/311/expected.json | 42 +- .../core/uncategorised/312/expected.json | 42 +- .../core/uncategorised/314/expected.json | 38 +- .../core/uncategorised/315/expected.json | 38 +- .../core/uncategorised/317/expected.json | 7 +- .../core/uncategorised/318/expected.json | 34 +- .../core/uncategorised/319/expected.json | 19 +- .../core/uncategorised/320/expected.json | 19 +- .../core/uncategorised/322/expected.json | 17 +- .../core/uncategorised/323/expected.json | 19 +- .../core/uncategorised/324/expected.json | 15 +- .../core/uncategorised/341/expected.json | 10 +- .../core/uncategorised/342/expected.json | 35 +- .../core/uncategorised/343/expected.json | 23 +- .../core/uncategorised/344/expected.json | 70 ++-- .../core/uncategorised/35/expected.json | 14 +- .../core/uncategorised/36/expected.json | 14 +- .../core/uncategorised/4/expected.json | 7 +- .../core/uncategorised/42/expected.json | 14 +- .../core/uncategorised/43/expected.json | 14 +- .../core/uncategorised/44/expected.json | 11 +- .../core/uncategorised/45/expected.json | 11 +- .../core/uncategorised/46/expected.json | 21 +- .../core/uncategorised/466/expected.json | 186 +++++++++ .../core/uncategorised/467/expected.json | 184 +++++++++ .../core/uncategorised/468/expected.json | 186 +++++++++ .../core/uncategorised/469/expected.json | 186 +++++++++ .../core/uncategorised/47/expected.json | 33 +- .../core/uncategorised/470/expected.json | 201 ++++++++++ .../core/uncategorised/471/expected.json | 201 ++++++++++ .../core/uncategorised/472/expected.json | 184 +++++++++ .../core/uncategorised/473/expected.json | 184 +++++++++ .../core/uncategorised/474/expected.json | 167 ++++++++ .../core/uncategorised/475/expected.json | 167 ++++++++ .../core/uncategorised/476/expected.json | 167 ++++++++ .../core/uncategorised/477/expected.json | 167 ++++++++ .../core/uncategorised/478/expected.json | 167 ++++++++ .../core/uncategorised/479/expected.json | 167 ++++++++ .../core/uncategorised/48/expected.json | 33 +- .../core/uncategorised/480/expected.json | 167 ++++++++ .../core/uncategorised/481/expected.json | 167 ++++++++ .../core/uncategorised/482/expected.json | 170 ++++++++ .../core/uncategorised/483/expected.json | 170 ++++++++ .../core/uncategorised/486/expected.json | 204 ++++++++++ .../core/uncategorised/487/expected.json | 204 ++++++++++ .../core/uncategorised/49/expected.json | 21 +- .../core/uncategorised/490/expected.json | 240 +++++++++++ .../core/uncategorised/492/expected.json | 295 ++++++++++++++ .../core/uncategorised/493/expected.json | 242 +++++++++++ .../core/uncategorised/494/expected.json | 257 ++++++++++++ .../uncategorised/497}/expected.json | 184 ++++----- .../core/uncategorised/498/expected.json | 187 +++++++++ .../core/uncategorised/499/expected.json | 150 +++++++ .../core/uncategorised/5/expected.json | 7 +- .../core/uncategorised/50/expected.json | 21 +- .../core/uncategorised/500/expected.json | 152 +++++++ .../core/uncategorised/501/expected.json | 209 ++++++++++ .../core/uncategorised/502/expected.json | 209 ++++++++++ .../core/uncategorised/503/expected.json | 203 ++++++++++ .../core/uncategorised/504/expected.json | 169 ++++++++ .../core/uncategorised/505/expected.json | 169 ++++++++ .../core/uncategorised/506/expected.json | 169 ++++++++ .../core/uncategorised/507/expected.json | 169 ++++++++ .../core/uncategorised/508/expected.json | 169 ++++++++ .../core/uncategorised/509/expected.json | 169 ++++++++ .../core/uncategorised/51/expected.json | 21 +- .../core/uncategorised/510/expected.json | 169 ++++++++ .../core/uncategorised/513/expected.json | 118 ++++++ .../core/uncategorised/514/expected.json | 151 +++++++ .../core/uncategorised/517/expected.json | 218 ++++++++++ .../core/uncategorised/518/expected.json | 169 ++++++++ .../core/uncategorised/519/expected.json | 221 ++++++++++ .../core/uncategorised/52/expected.json | 21 +- .../core/uncategorised/522/expected.json | 270 +++++++++++++ .../core/uncategorised/527/expected.json | 11 +- .../core/uncategorised/528/expected.json | 19 +- .../core/uncategorised/529/expected.json | 27 +- .../core/uncategorised/53/expected.json | 21 +- .../core/uncategorised/530/expected.json | 11 +- .../core/uncategorised/531/expected.json | 19 +- .../core/uncategorised/533/expected.json | 11 +- .../core/uncategorised/534/expected.json | 19 +- .../core/uncategorised/535/expected.json | 27 +- .../core/uncategorised/537/expected.json | 11 +- .../core/uncategorised/538/expected.json | 29 +- .../core/uncategorised/54/expected.json | 21 +- .../core/uncategorised/540/expected.json | 18 +- .../core/uncategorised/541/expected.json | 10 +- .../core/uncategorised/55/expected.json | 21 +- .../core/uncategorised/56/expected.json | 21 +- .../core/uncategorised/57/expected.json | 27 +- .../core/uncategorised/58/expected.json | 27 +- .../core/uncategorised/59/expected.json | 21 +- .../core/uncategorised/6/expected.json | 31 +- .../core/uncategorised/60/expected.json | 27 +- .../core/uncategorised/61/expected.json | 27 +- .../core/uncategorised/62/expected.json | 21 +- .../core/uncategorised/63/expected.json | 33 +- .../core/uncategorised/64/expected.json | 32 +- .../core/uncategorised/65/expected.json | 23 +- .../core/uncategorised/66/expected.json | 11 +- .../core/uncategorised/67/expected.json | 11 +- .../core/uncategorised/68/expected.json | 11 +- .../core/uncategorised/69/expected.json | 11 +- .../core/uncategorised/70/expected.json | 11 +- .../core/uncategorised/71/expected.json | 11 +- .../core/uncategorised/72/expected.json | 11 +- .../core/uncategorised/73/expected.json | 11 +- .../core/uncategorised/74/expected.json | 11 +- .../core/uncategorised/75/expected.json | 11 +- .../core/uncategorised/76/expected.json | 11 +- .../core/uncategorised/77/expected.json | 11 +- .../core/uncategorised/78/expected.json | 11 +- .../core/uncategorised/79/expected.json | 11 +- .../core/uncategorised/80/expected.json | 11 +- .../core/uncategorised/81/expected.json | 11 +- .../core/uncategorised/82/expected.json | 11 +- .../core/uncategorised/83/expected.json | 11 +- .../core/uncategorised/84/expected.json | 11 +- .../core/uncategorised/85/expected.json | 15 +- .../core/uncategorised/86/expected.json | 17 +- .../core/uncategorised/87/expected.json | 17 +- .../core/uncategorised/88/expected.json | 17 +- .../core/uncategorised/89/expected.json | 17 +- .../core/uncategorised/9/expected.json | 11 +- .../core/uncategorised/90/expected.json | 17 +- .../core/uncategorised/91/expected.json | 17 +- .../core/uncategorised/92/expected.json | 17 +- .../core/uncategorised/93/expected.json | 17 +- .../core/uncategorised/94/expected.json | 17 +- .../core/uncategorised/95/expected.json | 17 +- .../core/uncategorised/96/expected.json | 17 +- .../core/uncategorised/97/expected.json | 17 +- .../core/uncategorised/98/expected.json | 17 +- .../core/uncategorised/99/expected.json | 17 +- .../migrated_0002/expected.json | 15 +- .../migrated_0003/expected.json | 22 +- .../migrated_0004/expected.json | 10 +- .../migrated_0005/expected.json | 28 +- .../migrated_0006/expected.json | 28 +- .../migrated_0007/expected.json | 10 +- .../migrated_0008/expected.json | 28 +- .../migrated_0009/expected.json | 28 +- .../migrated_0010/expected.json | 10 +- .../migrated_0011/expected.json | 28 +- .../migrated_0012/expected.json | 28 +- .../migrated_0014/expected.json | 24 +- .../migrated_0015/expected.json | 24 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 14 +- .../migrated_0002/expected.json | 30 +- .../dupe-param/expected.json | 151 +++++++ .../empty-param/expected.json | 18 +- .../migrated_0004/expected.json | 10 +- .../migrated_0005/expected.json | 21 +- .../migrated_0012/expected.json | 10 +- .../migrated_0014/expected.json | 22 +- .../migrated_0002/expected.json | 14 +- .../migrated_0003/expected.json | 30 +- .../migrated_0000/expected.json | 77 ++-- .../migrated_0001/expected.json | 77 ++-- .../array-binding-pattern-01/expected.json | 11 +- .../array-binding-pattern-02/expected.json | 11 +- .../array-binding-pattern-03/expected.json | 11 +- .../array-binding-pattern-empty/expected.json | 11 +- .../elision/expected.json | 11 +- .../dupe-param-1/expected.json | 168 ++++++++ .../dupe-param-2/expected.json | 183 +++++++++ .../dupe-param-3/expected.json | 235 +++++++++++ .../elision/expected.json | 11 +- .../empty-pattern-var/expected.json | 11 +- .../es2015-array-pattern/hole/expected.json | 11 +- .../nested-pattern/expected.json | 11 +- .../patterned-catch/expected.json | 25 +- .../es2015-array-pattern/rest/expected.json | 11 +- .../tailing-hold/expected.json | 11 +- .../with-default-catch-param/expected.json | 17 +- .../with-default-fn/expected.json | 14 +- .../with-object-pattern/expected.json | 11 +- .../expected.json | 11 +- .../arrow-with-only-rest/expected.json | 11 +- .../options.json | 2 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0003/expected.json | 11 +- .../migrated_0004/expected.json | 14 +- .../migrated_0005/expected.json | 15 +- .../migrated_0006/expected.json | 14 +- .../migrated_0007/expected.json | 14 +- .../migrated_0008/expected.json | 11 +- .../migrated_0009/expected.json | 11 +- .../migrated_0010/expected.json | 11 +- .../migrated_0011/expected.json | 11 +- .../migrated_0012/expected.json | 11 +- .../migrated_0013/expected.json | 19 +- .../migrated_0014/expected.json | 19 +- .../migrated_0015/expected.json | 7 +- .../migrated_0016/expected.json | 11 +- .../migrated_0017/expected.json | 11 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0003/expected.json | 11 +- .../migrated_0004/expected.json | 11 +- .../migrated_0005/expected.json | 11 +- .../es2015-class/migrated_0001/expected.json | 11 +- .../es2015-class/migrated_0016/expected.json | 11 +- .../es2015-class/migrated_0019/expected.json | 25 +- .../es2015-class/migrated_0021/expected.json | 14 +- .../es2015-class/migrated_0022/expected.json | 7 +- .../es2015-class/migrated_0023/expected.json | 7 +- .../es2015-class/migrated_0024/expected.json | 15 +- .../es2015-class/migrated_0025/expected.json | 15 +- .../migrated_0000/expected.json | 14 +- .../migrated_0001/expected.json | 14 +- .../migrated_0002/expected.json | 14 +- .../dup-assignment/expected.json | 11 +- .../elision/expected.json | 11 +- .../member-expr-in-rest/expected.json | 19 +- .../nested-assignment/expected.json | 27 +- .../nested-cover-grammar/expected.json | 11 +- .../simple-assignment/expected.json | 11 +- .../expected.json | 15 +- .../nested-cover-grammar/expected.json | 19 +- .../object-pattern-assignment/expected.json | 15 +- .../export-const-number/expected.json | 11 +- .../export-default-class/expected.json | 5 +- .../export-default-expression/expected.json | 23 +- .../export-default-function/expected.json | 8 +- .../export-default-number/expected.json | 11 +- .../export-default-object/expected.json | 11 +- .../export-from-batch/expected.json | 11 +- .../export-from-default/expected.json | 11 +- .../expected.json | 11 +- .../expected.json | 11 +- .../expected.json | 11 +- .../export-from-specifier/expected.json | 11 +- .../export-from-specifiers/expected.json | 11 +- .../export-function-declaration/expected.json | 10 +- .../export-let-number/expected.json | 11 +- .../export-var-number/expected.json | 11 +- .../expected.json | 14 +- .../expected.json | 14 +- .../expected.json | 10 +- .../expected.json | 10 +- .../expected.json | 10 +- .../expected.json | 18 +- .../generator-expression/expected.json | 10 +- .../expected.json | 10 +- .../expected.json | 18 +- .../expected.json | 18 +- .../expected.json | 18 +- .../generator-method-with-yield/expected.json | 10 +- .../generator-method/expected.json | 10 +- .../module_await/expected.json | 11 +- .../valid_await/expected.json | 7 +- .../expected.json | 11 +- .../expected.json | 11 +- .../import-default-as/expected.json | 11 +- .../import-default/expected.json | 11 +- .../import-jquery/expected.json | 11 +- .../import-module/expected.json | 11 +- .../import-named-as-specifier/expected.json | 11 +- .../import-named-as-specifiers/expected.json | 11 +- .../import-named-empty/expected.json | 11 +- .../import-named-specifier/expected.json | 11 +- .../expected.json | 11 +- .../import-named-specifiers/expected.json | 11 +- .../import-namespace-specifier/expected.json | 11 +- .../import-null-as-nil/expected.json | 11 +- .../migrated_0000/expected.json | 19 +- .../migrated_0002/expected.json | 14 +- .../options.json | 4 +- .../options.json | 4 +- .../options.json | 4 +- .../options.json | 4 +- .../invalid-proto-shorthands/options.json | 4 +- .../expected.json | 13 +- .../proto-identifier-getter/expected.json | 10 +- .../proto-identifier-method/expected.json | 10 +- .../proto-identifier-setter/expected.json | 10 +- .../proto-literal-getter-setter/expected.json | 21 +- .../proto-literal-getter/expected.json | 18 +- .../proto-literal-method/expected.json | 18 +- .../proto-literal-setter/expected.json | 18 +- .../elision/expected.json | 11 +- .../empty-for-lex/expected.json | 11 +- .../empty-lexical/expected.json | 11 +- .../empty-var/expected.json | 11 +- .../nested/expected.json | 11 +- .../properties/expected.json | 27 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 81 ++-- .../migrated_0003/expected.json | 11 +- .../migrated_0004/expected.json | 11 +- .../migrated_0005/expected.json | 11 +- .../migrated_0006/expected.json | 81 ++-- .../call-spread-number/expected.json | 11 +- .../new-spread-number/expected.json | 11 +- .../super_computed/expected.json | 14 +- .../escape-sequences/expected.json | 11 +- .../line-terminators/expected.json | 11 +- .../literal-escape-sequences/expected.json | 11 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../expected.json | 150 +++++++ .../expected.json | 136 +++++++ .../expected.json | 184 +++++++++ .../expected.json | 149 +++++++ .../expected.json | 135 +++++++ .../expected.json | 134 +++++++ .../expected.json | 150 +++++++ .../expected.json | 117 ++++++ .../yield-array-pattern/expected.json | 7 +- .../yield-arrow-parameter-name/expected.json | 11 +- .../expected.json | 10 +- .../yield-function-expression/expected.json | 10 +- .../yield-generator-method/expected.json | 10 +- .../yield-lexical-declaration/expected.json | 11 +- .../es2015-yield/yield-method/expected.json | 10 +- .../expected.json | 70 ++-- .../yield-strict-method/expected.json | 77 ++-- .../migrated_0002/expected.json | 19 +- .../migrated_0000/expected.json | 11 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0003/expected.json | 11 +- .../migrated_0004/expected.json | 11 +- .../migrated_0005/expected.json | 11 +- .../migrated_0006/expected.json | 11 +- .../migrated_0007/expected.json | 11 +- .../migrated_0008/expected.json | 11 +- .../migrated_0009/expected.json | 11 +- .../migrated_0010/expected.json | 11 +- .../migrated_0011/expected.json | 11 +- .../migrated_0012/expected.json | 11 +- .../migrated_0013/expected.json | 11 +- .../migrated_0000/expected.json | 19 +- .../migrated_0001/expected.json | 19 +- .../migrated_0002/expected.json | 29 +- .../migrated_0000/expected.json | 31 +- .../migrated_0001/expected.json | 29 +- .../migrated_0007/expected.json | 7 +- .../migrated_0009/expected.json | 7 +- .../migrated_0015/expected.json | 11 +- .../migrated_0016/expected.json | 11 +- .../migrated_0017/expected.json | 35 +- .../migrated_0018/expected.json | 11 +- .../migrated_0087}/expected.json | 196 +++++---- .../migrated_0088/expected.json | 136 +++++++ .../migrated_0089/expected.json | 136 +++++++ .../migrated_0090/expected.json | 152 +++++++ .../migrated_0091/expected.json | 152 +++++++ .../migrated_0094/expected.json | 136 +++++++ .../migrated_0100/expected.json | 136 +++++++ .../migrated_0183/expected.json | 186 +++++++++ .../migrated_0184/expected.json | 184 +++++++++ .../migrated_0185/expected.json | 186 +++++++++ .../migrated_0186/expected.json | 186 +++++++++ .../migrated_0187/expected.json | 201 ++++++++++ .../migrated_0188/expected.json | 201 ++++++++++ .../migrated_0189/expected.json | 184 +++++++++ .../migrated_0190/expected.json | 184 +++++++++ .../migrated_0191/expected.json | 167 ++++++++ .../migrated_0192/expected.json | 167 ++++++++ .../migrated_0193/expected.json | 167 ++++++++ .../migrated_0194/expected.json | 167 ++++++++ .../migrated_0195/expected.json | 167 ++++++++ .../migrated_0196/expected.json | 167 ++++++++ .../migrated_0197/expected.json | 167 ++++++++ .../migrated_0198/expected.json | 167 ++++++++ .../migrated_0199/expected.json | 170 ++++++++ .../migrated_0200/expected.json | 170 ++++++++ .../migrated_0203/expected.json | 204 ++++++++++ .../migrated_0204/expected.json | 204 ++++++++++ .../migrated_0207/expected.json | 240 +++++++++++ .../migrated_0209/expected.json | 295 ++++++++++++++ .../migrated_0210/expected.json | 242 +++++++++++ .../migrated_0211/expected.json | 257 ++++++++++++ .../migrated_0214/expected.json | 187 +++++++++ .../migrated_0215/expected.json | 187 +++++++++ .../invalid-syntax/migrated_0216/options.json | 4 +- .../migrated_0217/expected.json | 150 +++++++ .../migrated_0218/expected.json | 152 +++++++ .../migrated_0219/expected.json | 209 ++++++++++ .../migrated_0220/expected.json | 209 ++++++++++ .../invalid-syntax/migrated_0221/options.json | 4 +- .../invalid-syntax/migrated_0222/options.json | 4 +- .../migrated_0223/expected.json | 203 ++++++++++ .../migrated_0224/expected.json | 169 ++++++++ .../migrated_0225/expected.json | 169 ++++++++ .../migrated_0226/expected.json | 169 ++++++++ .../migrated_0227/expected.json | 169 ++++++++ .../migrated_0228/expected.json | 169 ++++++++ .../migrated_0229/expected.json | 169 ++++++++ .../migrated_0230/expected.json | 169 ++++++++ .../migrated_0231/expected.json | 169 ++++++++ .../migrated_0239/expected.json | 118 ++++++ .../migrated_0240/expected.json | 151 +++++++ .../migrated_0243/expected.json | 218 ++++++++++ .../migrated_0244/expected.json | 169 ++++++++ .../migrated_0245/expected.json | 221 ++++++++++ .../migrated_0249/expected.json | 151 +++++++ .../invalid-syntax/migrated_0270/options.json | 4 +- .../invalid-syntax/migrated_0271/options.json | 4 +- .../invalid-syntax/migrated_0278/options.json | 4 +- .../migrated_0000/expected.json | 10 +- .../migrated_0001/expected.json | 10 +- .../migrated_0002/expected.json | 10 +- .../migrated_0003/expected.json | 10 +- .../migrated_0000/expected.json | 10 +- .../migrated_0001/expected.json | 10 +- .../migrated_0002/expected.json | 10 +- .../migrated_0003/expected.json | 10 +- .../migrated_0004/expected.json | 10 +- .../migrated_0002/expected.json | 11 +- .../migrated_0003/expected.json | 11 +- .../migrated_0004/expected.json | 11 +- .../migrated_0005/expected.json | 11 +- .../statement-if/migrated_0001/expected.json | 10 +- .../statement-if/migrated_0002/expected.json | 11 +- .../statement-if/migrated_0005/expected.json | 7 +- .../statement-if/migrated_0006/expected.json | 7 +- .../migrated_0000/expected.json | 7 +- .../migrated_0001/expected.json | 7 +- .../migrated_0002/expected.json | 14 +- .../migrated_0003/expected.json | 17 +- .../migrated_0004/expected.json | 7 +- .../migrated_0005/expected.json | 7 +- .../migrated_0006/expected.json | 7 +- .../migrated_0007/expected.json | 14 +- .../migrated_0010/expected.json | 11 +- .../migrated_0011/expected.json | 11 +- .../migrated_0012/expected.json | 11 +- .../migrated_0013/expected.json | 19 +- .../migrated_0014/expected.json | 19 +- .../migrated_0015/expected.json | 19 +- .../migrated_0016/expected.json | 19 +- .../migrated_0019/actual.js | 1 - .../migrated_0022/actual.js | 1 - .../migrated_0022/expected.json | 241 ----------- .../migrated_0023/actual.js | 1 - .../migrated_0023/expected.json | 278 ------------- .../migrated_0025/expected.json | 11 +- .../migrated_0001/expected.json | 7 +- .../migrated_0000/expected.json | 10 +- .../migrated_0001/expected.json | 10 +- .../migrated_0002/expected.json | 10 +- .../migrated_0003/expected.json | 10 +- .../migrated_0001/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0002/expected.json | 11 +- .../migrated_0003/expected.json | 19 +- .../migrated_0004/expected.json | 27 +- .../experimental/async-functions/options.json | 4 +- .../async-functions/pattern/expected.json | 11 +- .../uncategorised/10/expected.json | 5 +- .../uncategorised/10/options.json | 4 +- .../uncategorised/11/expected.json | 12 +- .../uncategorised/11/options.json | 4 +- .../uncategorised/12/options.json | 4 +- .../uncategorised/13/options.json | 4 +- .../uncategorised/14/expected.json | 7 +- .../uncategorised/14/options.json | 4 +- .../uncategorised/15/options.json | 4 +- .../uncategorised/16/options.json | 4 +- .../uncategorised/17/expected.json | 7 +- .../uncategorised/17/options.json | 4 +- .../uncategorised/18/options.json | 4 +- .../uncategorised/19/expected.json | 13 +- .../uncategorised/19/options.json | 4 +- .../uncategorised/20/options.json | 4 +- .../uncategorised/21/expected.json | 14 +- .../uncategorised/21/options.json | 4 +- .../uncategorised/22/options.json | 4 +- .../uncategorised/23/options.json | 4 +- .../uncategorised/24/options.json | 4 +- .../uncategorised/25/options.json | 4 +- .../uncategorised/26/expected.json | 19 +- .../uncategorised/26/options.json | 4 +- .../uncategorised/27/options.json | 4 +- .../uncategorised/28/expected.json | 19 +- .../uncategorised/28/options.json | 4 +- .../uncategorised/29/expected.json | 7 +- .../uncategorised/29/options.json | 4 +- .../uncategorised/3/expected.json | 11 +- .../experimental/uncategorised/3/options.json | 4 +- .../uncategorised/30/expected.json | 11 +- .../uncategorised/30/options.json | 4 +- .../uncategorised/31/expected.json | 6 +- .../uncategorised/31/options.json | 4 +- .../uncategorised/32/options.json | 4 +- .../uncategorised/33/options.json | 4 +- .../uncategorised/34/options.json | 4 +- .../uncategorised/35/options.json | 4 +- .../uncategorised/36/options.json | 4 +- .../uncategorised/37/options.json | 4 +- .../uncategorised/38/options.json | 4 +- .../uncategorised/39/expected.json | 11 +- .../uncategorised/39/options.json | 4 +- .../uncategorised/4/expected.json | 19 +- .../experimental/uncategorised/4/options.json | 4 +- .../uncategorised/40/options.json | 4 +- .../uncategorised/41/options.json | 4 +- .../uncategorised/42/options.json | 4 +- .../uncategorised/43/expected.json | 11 +- .../uncategorised/43/options.json | 4 +- .../uncategorised/44/options.json | 4 +- .../uncategorised/45/options.json | 4 +- .../uncategorised/46/expected.json | 11 +- .../uncategorised/46/options.json | 4 +- .../uncategorised/47/expected.json | 11 +- .../uncategorised/47/options.json | 8 +- .../uncategorised/48/expected.json | 11 +- .../uncategorised/48/options.json | 8 +- .../uncategorised/49/expected.json | 11 +- .../uncategorised/49/options.json | 4 +- .../uncategorised/5/expected.json | 31 +- .../experimental/uncategorised/5/options.json | 4 +- .../uncategorised/50/expected.json | 11 +- .../uncategorised/50/options.json | 4 +- .../uncategorised/51/expected.json | 11 +- .../uncategorised/51/options.json | 4 +- .../uncategorised/52/expected.json | 11 +- .../uncategorised/52/options.json | 4 +- .../uncategorised/53/expected.json | 11 +- .../uncategorised/53/options.json | 4 +- .../uncategorised/54/expected.json | 11 +- .../uncategorised/54/options.json | 4 +- .../uncategorised/55/expected.json | 19 +- .../uncategorised/55/options.json | 4 +- .../uncategorised/56/options.json | 4 +- .../uncategorised/57/options.json | 4 +- .../uncategorised/58/expected.json | 11 +- .../uncategorised/58/options.json | 4 +- .../uncategorised/59/options.json | 4 +- .../uncategorised/6/expected.json | 27 +- .../experimental/uncategorised/6/options.json | 4 +- .../uncategorised/60/options.json | 4 +- .../uncategorised/61/options.json | 4 +- .../uncategorised/62/options.json | 4 +- .../uncategorised/7/expected.json | 31 +- .../experimental/uncategorised/7/options.json | 4 +- .../uncategorised/8/expected.json | 27 +- .../experimental/uncategorised/8/options.json | 4 +- .../uncategorised/9/expected.json | 5 +- .../experimental/uncategorised/9/options.json | 4 +- .../flow/bounded-polymorphism/2/expected.json | 10 +- .../flow/declare-module/2/expected.json | 11 +- .../literal-types/number-binary/expected.json | 12 +- .../literal-types/number-float/expected.json | 12 +- .../number-integer/expected.json | 12 +- .../number-octal-2/expected.json | 12 +- .../literal-types/number-octal/expected.json | 12 +- .../literal-types/string-double/expected.json | 16 +- .../literal-types/string-single/expected.json | 16 +- test/fixtures/flow/options.json | 3 +- .../flow/regression/issue-2083/expected.json | 35 +- test/fixtures/flow/tuples/3/expected.json | 11 +- test/fixtures/flow/tuples/4/expected.json | 19 +- .../flow/type-annotations/1/expected.json | 10 +- .../flow/type-annotations/10/expected.json | 10 +- .../flow/type-annotations/11/expected.json | 10 +- .../flow/type-annotations/12/expected.json | 10 +- .../flow/type-annotations/13/expected.json | 10 +- .../flow/type-annotations/14/expected.json | 10 +- .../flow/type-annotations/15/expected.json | 10 +- .../flow/type-annotations/16/expected.json | 10 +- .../flow/type-annotations/17/expected.json | 10 +- .../flow/type-annotations/18/expected.json | 10 +- .../flow/type-annotations/19/expected.json | 10 +- .../flow/type-annotations/2/expected.json | 10 +- .../flow/type-annotations/20/expected.json | 10 +- .../flow/type-annotations/21/expected.json | 10 +- .../flow/type-annotations/22/expected.json | 10 +- .../flow/type-annotations/23/expected.json | 10 +- .../flow/type-annotations/24/expected.json | 10 +- .../flow/type-annotations/26/expected.json | 15 +- .../flow/type-annotations/27/expected.json | 10 +- .../flow/type-annotations/28/expected.json | 10 +- .../flow/type-annotations/29/expected.json | 10 +- .../flow/type-annotations/3/expected.json | 10 +- .../flow/type-annotations/4/expected.json | 10 +- .../flow/type-annotations/44/expected.json | 27 +- .../flow/type-annotations/5/expected.json | 10 +- .../flow/type-annotations/50/expected.json | 15 +- .../flow/type-annotations/51/expected.json | 15 +- .../flow/type-annotations/52/expected.json | 10 +- .../flow/type-annotations/55/expected.json | 11 +- .../flow/type-annotations/56/expected.json | 10 +- .../flow/type-annotations/6/expected.json | 10 +- .../flow/type-annotations/60/expected.json | 11 +- .../flow/type-annotations/61/expected.json | 11 +- .../flow/type-annotations/62/expected.json | 11 +- .../flow/type-annotations/63/expected.json | 10 +- .../flow/type-annotations/64/expected.json | 10 +- .../flow/type-annotations/65/expected.json | 10 +- .../flow/type-annotations/66/expected.json | 14 +- .../flow/type-annotations/67/expected.json | 7 +- .../flow/type-annotations/68/expected.json | 11 +- .../flow/type-annotations/7/expected.json | 10 +- .../flow/type-annotations/72/expected.json | 11 +- .../flow/type-annotations/73/expected.json | 15 +- .../flow/type-annotations/74/expected.json | 19 +- .../flow/type-annotations/78/expected.json | 10 +- .../flow/type-annotations/79/expected.json | 14 +- .../flow/type-annotations/8/expected.json | 10 +- .../flow/type-annotations/80/expected.json | 11 +- .../flow/type-annotations/89/expected.json | 11 +- .../flow/type-annotations/9/expected.json | 10 +- .../flow/type-annotations/90/expected.json | 11 +- .../flow/type-annotations/91/expected.json | 11 +- .../flow/type-annotations/92/expected.json | 11 +- .../flow/type-annotations/93/expected.json | 11 +- .../flow/type-annotations/94/expected.json | 11 +- .../flow/type-annotations/95/expected.json | 11 +- .../flow/type-annotations/96/expected.json | 11 +- .../flow/type-annotations/97/expected.json | 11 +- .../type-exports/specifier-from/expected.json | 11 +- test/fixtures/flow/typecasts/1/expected.json | 10 +- test/fixtures/flow/typecasts/2/expected.json | 23 +- test/fixtures/flow/typecasts/3/expected.json | 16 +- test/fixtures/flow/typecasts/4/expected.json | 18 +- .../call-expression/expected.json | 11 +- .../expected.json | 12 +- .../expected.json | 10 +- .../harmony/uncategorised/1/expected.json | 17 +- .../harmony/uncategorised/10/expected.json | 11 +- .../harmony/uncategorised/100/expected.json | 13 +- .../harmony/uncategorised/101/expected.json | 13 +- .../harmony/uncategorised/106/expected.json | 18 +- .../harmony/uncategorised/109/options.json | 3 + .../harmony/uncategorised/11/expected.json | 11 +- .../harmony/uncategorised/12/expected.json | 11 +- .../harmony/uncategorised/123/expected.json | 77 ++-- .../harmony/uncategorised/124/expected.json | 14 +- .../harmony/uncategorised/13/expected.json | 11 +- .../harmony/uncategorised/130/expected.json | 77 ++-- .../harmony/uncategorised/14/expected.json | 11 +- .../harmony/uncategorised/141/expected.json | 15 +- .../harmony/uncategorised/142/expected.json | 31 +- .../harmony/uncategorised/143/expected.json | 13 +- .../harmony/uncategorised/144/expected.json | 23 +- .../harmony/uncategorised/145/expected.json | 16 +- .../harmony/uncategorised/146/expected.json | 13 +- .../harmony/uncategorised/15/expected.json | 11 +- .../harmony/uncategorised/152/expected.json | 14 +- .../harmony/uncategorised/153/expected.json | 14 +- .../harmony/uncategorised/154/expected.json | 14 +- .../harmony/uncategorised/155/expected.json | 18 +- .../harmony/uncategorised/156/expected.json | 18 +- .../harmony/uncategorised/157/expected.json | 18 +- .../harmony/uncategorised/158/expected.json | 18 +- .../harmony/uncategorised/159/expected.json | 14 +- .../harmony/uncategorised/16/expected.json | 11 +- .../harmony/uncategorised/160/expected.json | 14 +- .../harmony/uncategorised/161/expected.json | 14 +- .../harmony/uncategorised/162/expected.json | 14 +- .../harmony/uncategorised/167/options.json | 3 + .../harmony/uncategorised/168/options.json | 3 + .../harmony/uncategorised/169/expected.json | 13 +- .../harmony/uncategorised/17/expected.json | 11 +- .../harmony/uncategorised/170/expected.json | 13 +- .../harmony/uncategorised/171/options.json | 3 + .../harmony/uncategorised/172/options.json | 3 + .../harmony/uncategorised/173/expected.json | 13 +- .../harmony/uncategorised/174/options.json | 3 + .../harmony/uncategorised/175/options.json | 3 + .../harmony/uncategorised/180/options.json | 3 + .../harmony/uncategorised/181/options.json | 3 + .../harmony/uncategorised/195/expected.json | 7 +- .../harmony/uncategorised/196/expected.json | 7 +- .../harmony/uncategorised/197/expected.json | 10 +- .../harmony/uncategorised/2/expected.json | 17 +- .../harmony/uncategorised/227/expected.json | 295 ++++++++++++++ .../harmony/uncategorised/228/expected.json | 258 ++++++++++++ .../harmony/uncategorised/242/expected.json | 169 ++++++++ .../harmony/uncategorised/243/expected.json | 136 +++++++ .../harmony/uncategorised/244/expected.json | 136 +++++++ .../harmony/uncategorised/245/expected.json | 152 +++++++ .../harmony/uncategorised/246/expected.json | 152 +++++++ .../harmony/uncategorised/247/expected.json | 185 +++++++++ .../harmony/uncategorised/249/expected.json | 136 +++++++ .../harmony/uncategorised/256/expected.json | 11 +- .../harmony/uncategorised/257/expected.json | 11 +- .../harmony/uncategorised/259/expected.json | 18 +- .../harmony/uncategorised/26/expected.json | 22 +- .../harmony/uncategorised/269/actual.js | 1 - .../harmony/uncategorised/269/options.json | 6 - .../harmony/uncategorised/27/expected.json | 19 +- .../harmony/uncategorised/270/actual.js | 1 - .../harmony/uncategorised/270/options.json | 6 - .../harmony/uncategorised/271/actual.js | 1 - .../harmony/uncategorised/271/options.json | 6 - .../harmony/uncategorised/272/actual.js | 1 - .../harmony/uncategorised/272/options.json | 6 - .../harmony/uncategorised/274/actual.js | 1 - .../harmony/uncategorised/274/options.json | 6 - .../harmony/uncategorised/28/expected.json | 11 +- .../harmony/uncategorised/280/expected.json | 203 ++++++++++ .../harmony/uncategorised/281/expected.json | 376 ++++++++++++++++++ .../harmony/uncategorised/282/actual.js | 1 - .../harmony/uncategorised/282/options.json | 3 - .../harmony/uncategorised/286/options.json | 4 +- .../harmony/uncategorised/29/expected.json | 11 +- .../harmony/uncategorised/296/expected.json | 136 +++++++ .../harmony/uncategorised/3/expected.json | 11 +- .../harmony/uncategorised/30/expected.json | 11 +- .../harmony/uncategorised/300/expected.json | 14 +- .../harmony/uncategorised/301/expected.json | 11 +- .../harmony/uncategorised/307/expected.json | 15 +- .../harmony/uncategorised/308/expected.json | 11 +- .../harmony/uncategorised/309/expected.json | 11 +- .../harmony/uncategorised/31/expected.json | 11 +- .../harmony/uncategorised/310/expected.json | 11 +- .../harmony/uncategorised/317/expected.json | 23 +- .../harmony/uncategorised/318/expected.json | 11 +- .../harmony/uncategorised/319/expected.json | 11 +- .../harmony/uncategorised/32/expected.json | 14 +- .../harmony/uncategorised/320/expected.json | 11 +- .../harmony/uncategorised/322/expected.json | 11 +- .../harmony/uncategorised/33/expected.json | 15 +- .../harmony/uncategorised/332/expected.json | 162 ++++++++ .../harmony/uncategorised/333/expected.json | 216 ++++++++++ .../harmony/uncategorised/338/expected.json | 10 +- .../harmony/uncategorised/34/expected.json | 14 +- .../harmony/uncategorised/35/expected.json | 14 +- .../harmony/uncategorised/353/options.json | 3 + .../harmony/uncategorised/36/expected.json | 11 +- .../harmony/uncategorised/39/expected.json | 11 +- .../harmony/uncategorised/4/expected.json | 11 +- .../harmony/uncategorised/40/expected.json | 11 +- .../harmony/uncategorised/41/expected.json | 11 +- .../harmony/uncategorised/42/expected.json | 11 +- .../harmony/uncategorised/43/expected.json | 11 +- .../harmony/uncategorised/44/expected.json | 19 +- .../harmony/uncategorised/45/expected.json | 19 +- .../harmony/uncategorised/46/expected.json | 10 +- .../harmony/uncategorised/47/expected.json | 11 +- .../harmony/uncategorised/48/expected.json | 14 +- .../harmony/uncategorised/5/expected.json | 81 ++-- .../harmony/uncategorised/54/expected.json | 14 +- .../harmony/uncategorised/57/actual.js | 1 - .../harmony/uncategorised/57/options.json | 5 - .../harmony/uncategorised/58/actual.js | 1 - .../harmony/uncategorised/58/expected.json | 225 ----------- .../harmony/uncategorised/58/options.json | 5 - .../harmony/uncategorised/59/actual.js | 1 - .../harmony/uncategorised/59/expected.json | 225 ----------- .../harmony/uncategorised/59/options.json | 5 - .../harmony/uncategorised/6/expected.json | 11 +- .../harmony/uncategorised/60/actual.js | 1 - .../harmony/uncategorised/60/expected.json | 363 ----------------- .../harmony/uncategorised/60/options.json | 5 - .../harmony/uncategorised/7/expected.json | 11 +- .../harmony/uncategorised/79/expected.json | 11 +- .../harmony/uncategorised/8/expected.json | 11 +- .../harmony/uncategorised/80/expected.json | 11 +- .../harmony/uncategorised/82/expected.json | 8 +- .../harmony/uncategorised/85/expected.json | 11 +- .../harmony/uncategorised/9/expected.json | 81 ++-- .../harmony/uncategorised/90/expected.json | 11 +- .../harmony/uncategorised/91/expected.json | 11 +- .../harmony/uncategorised/92/expected.json | 11 +- .../harmony/uncategorised/93/expected.json | 11 +- .../harmony/uncategorised/94/expected.json | 11 +- .../harmony/uncategorised/95/expected.json | 11 +- .../harmony/uncategorised/97/expected.json | 11 +- .../harmony/uncategorised/98/expected.json | 11 +- .../harmony/uncategorised/99/expected.json | 13 +- test/fixtures/jsx/basic/10/expected.json | 21 +- test/fixtures/jsx/basic/11/expected.json | 8 +- test/fixtures/jsx/basic/12/expected.json | 8 +- test/fixtures/jsx/basic/13/expected.json | 12 +- test/fixtures/jsx/basic/16/expected.json | 10 +- test/fixtures/jsx/basic/18/expected.json | 8 +- test/fixtures/jsx/basic/19/expected.json | 13 +- test/fixtures/jsx/basic/3/expected.json | 18 +- test/fixtures/jsx/basic/4/expected.json | 26 +- test/fixtures/jsx/basic/7/expected.json | 13 +- test/fixtures/jsx/options.json | 2 +- test/fixtures/jsx/regression/1/expected.json | 23 +- test/fixtures/jsx/regression/4/expected.json | 8 +- test/fixtures/jsx/regression/6/expected.json | 8 +- test/fixtures/jsx/regression/7/expected.json | 8 +- .../jsx/regression/issue-2083/expected.json | 11 +- .../jsx/regression/issue-2114/expected.json | 8 +- 892 files changed, 28000 insertions(+), 5962 deletions(-) create mode 100644 test/fixtures/core/uncategorised/466/expected.json create mode 100644 test/fixtures/core/uncategorised/467/expected.json create mode 100644 test/fixtures/core/uncategorised/468/expected.json create mode 100644 test/fixtures/core/uncategorised/469/expected.json create mode 100644 test/fixtures/core/uncategorised/470/expected.json create mode 100644 test/fixtures/core/uncategorised/471/expected.json create mode 100644 test/fixtures/core/uncategorised/472/expected.json create mode 100644 test/fixtures/core/uncategorised/473/expected.json create mode 100644 test/fixtures/core/uncategorised/474/expected.json create mode 100644 test/fixtures/core/uncategorised/475/expected.json create mode 100644 test/fixtures/core/uncategorised/476/expected.json create mode 100644 test/fixtures/core/uncategorised/477/expected.json create mode 100644 test/fixtures/core/uncategorised/478/expected.json create mode 100644 test/fixtures/core/uncategorised/479/expected.json create mode 100644 test/fixtures/core/uncategorised/480/expected.json create mode 100644 test/fixtures/core/uncategorised/481/expected.json create mode 100644 test/fixtures/core/uncategorised/482/expected.json create mode 100644 test/fixtures/core/uncategorised/483/expected.json create mode 100644 test/fixtures/core/uncategorised/486/expected.json create mode 100644 test/fixtures/core/uncategorised/487/expected.json create mode 100644 test/fixtures/core/uncategorised/490/expected.json create mode 100644 test/fixtures/core/uncategorised/492/expected.json create mode 100644 test/fixtures/core/uncategorised/493/expected.json create mode 100644 test/fixtures/core/uncategorised/494/expected.json rename test/fixtures/{esprima/statement-iteration/migrated_0019 => core/uncategorised/497}/expected.json (50%) create mode 100644 test/fixtures/core/uncategorised/498/expected.json create mode 100644 test/fixtures/core/uncategorised/499/expected.json create mode 100644 test/fixtures/core/uncategorised/500/expected.json create mode 100644 test/fixtures/core/uncategorised/501/expected.json create mode 100644 test/fixtures/core/uncategorised/502/expected.json create mode 100644 test/fixtures/core/uncategorised/503/expected.json create mode 100644 test/fixtures/core/uncategorised/504/expected.json create mode 100644 test/fixtures/core/uncategorised/505/expected.json create mode 100644 test/fixtures/core/uncategorised/506/expected.json create mode 100644 test/fixtures/core/uncategorised/507/expected.json create mode 100644 test/fixtures/core/uncategorised/508/expected.json create mode 100644 test/fixtures/core/uncategorised/509/expected.json create mode 100644 test/fixtures/core/uncategorised/510/expected.json create mode 100644 test/fixtures/core/uncategorised/513/expected.json create mode 100644 test/fixtures/core/uncategorised/514/expected.json create mode 100644 test/fixtures/core/uncategorised/517/expected.json create mode 100644 test/fixtures/core/uncategorised/518/expected.json create mode 100644 test/fixtures/core/uncategorised/519/expected.json create mode 100644 test/fixtures/core/uncategorised/522/expected.json create mode 100644 test/fixtures/esprima/declaration-function/dupe-param/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/dupe-param-1/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/dupe-param-2/expected.json create mode 100644 test/fixtures/esprima/es2015-array-pattern/dupe-param-3/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/expected.json create mode 100644 test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/expected.json rename test/fixtures/{harmony/uncategorised/57 => esprima/invalid-syntax/migrated_0087}/expected.json (50%) create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0088/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0089/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0090/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0091/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0094/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0100/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0183/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0184/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0185/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0186/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0187/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0188/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0189/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0190/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0191/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0192/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0193/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0194/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0195/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0196/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0197/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0198/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0199/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0200/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0203/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0204/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0207/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0209/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0210/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0211/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0214/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0215/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0217/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0218/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0219/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0220/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0223/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0224/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0225/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0226/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0227/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0228/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0229/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0230/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0231/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0239/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0240/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0243/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0244/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0245/expected.json create mode 100644 test/fixtures/esprima/invalid-syntax/migrated_0249/expected.json delete mode 100644 test/fixtures/esprima/statement-iteration/migrated_0019/actual.js delete mode 100644 test/fixtures/esprima/statement-iteration/migrated_0022/actual.js delete mode 100644 test/fixtures/esprima/statement-iteration/migrated_0022/expected.json delete mode 100644 test/fixtures/esprima/statement-iteration/migrated_0023/actual.js delete mode 100644 test/fixtures/esprima/statement-iteration/migrated_0023/expected.json create mode 100644 test/fixtures/harmony/uncategorised/109/options.json create mode 100644 test/fixtures/harmony/uncategorised/167/options.json create mode 100644 test/fixtures/harmony/uncategorised/168/options.json create mode 100644 test/fixtures/harmony/uncategorised/171/options.json create mode 100644 test/fixtures/harmony/uncategorised/172/options.json create mode 100644 test/fixtures/harmony/uncategorised/174/options.json create mode 100644 test/fixtures/harmony/uncategorised/175/options.json create mode 100644 test/fixtures/harmony/uncategorised/180/options.json create mode 100644 test/fixtures/harmony/uncategorised/181/options.json create mode 100644 test/fixtures/harmony/uncategorised/227/expected.json create mode 100644 test/fixtures/harmony/uncategorised/228/expected.json create mode 100644 test/fixtures/harmony/uncategorised/242/expected.json create mode 100644 test/fixtures/harmony/uncategorised/243/expected.json create mode 100644 test/fixtures/harmony/uncategorised/244/expected.json create mode 100644 test/fixtures/harmony/uncategorised/245/expected.json create mode 100644 test/fixtures/harmony/uncategorised/246/expected.json create mode 100644 test/fixtures/harmony/uncategorised/247/expected.json create mode 100644 test/fixtures/harmony/uncategorised/249/expected.json delete mode 100644 test/fixtures/harmony/uncategorised/269/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/269/options.json delete mode 100644 test/fixtures/harmony/uncategorised/270/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/270/options.json delete mode 100644 test/fixtures/harmony/uncategorised/271/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/271/options.json delete mode 100644 test/fixtures/harmony/uncategorised/272/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/272/options.json delete mode 100644 test/fixtures/harmony/uncategorised/274/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/274/options.json create mode 100644 test/fixtures/harmony/uncategorised/280/expected.json create mode 100644 test/fixtures/harmony/uncategorised/281/expected.json delete mode 100644 test/fixtures/harmony/uncategorised/282/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/282/options.json create mode 100644 test/fixtures/harmony/uncategorised/296/expected.json create mode 100644 test/fixtures/harmony/uncategorised/332/expected.json create mode 100644 test/fixtures/harmony/uncategorised/333/expected.json create mode 100644 test/fixtures/harmony/uncategorised/353/options.json delete mode 100644 test/fixtures/harmony/uncategorised/57/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/57/options.json delete mode 100644 test/fixtures/harmony/uncategorised/58/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/58/expected.json delete mode 100644 test/fixtures/harmony/uncategorised/58/options.json delete mode 100644 test/fixtures/harmony/uncategorised/59/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/59/expected.json delete mode 100644 test/fixtures/harmony/uncategorised/59/options.json delete mode 100644 test/fixtures/harmony/uncategorised/60/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/60/expected.json delete mode 100644 test/fixtures/harmony/uncategorised/60/options.json 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..3599105db1 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": { @@ -139,7 +139,8 @@ "column": 5 } }, - "body": [] + "body": [], + "directives": [] } }, "leadingComments": [ @@ -157,11 +158,7 @@ "line": 7, "column": 7 } - }, - "range": [ - 63, - 98 - ] + } } ] } @@ -185,15 +182,12 @@ "line": 3, "column": 3 } - }, - "range": [ - 0, - 35 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -210,11 +204,7 @@ "line": 3, "column": 3 } - }, - "range": [ - 0, - 35 - ] + } }, { "type": "CommentBlock", @@ -230,11 +220,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 41527785fb..30e63041bc 100755 --- a/test/fixtures/comments/basic/surrounding-throw-comments/expected.json +++ b/test/fixtures/comments/basic/surrounding-throw-comments/expected.json @@ -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 9d9f17495b..d2805cc6ab 100755 --- a/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json +++ b/test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json @@ -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 1258711857..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 @@ -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 - ] + } } ] }, @@ -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 73e33512ba..444961e833 100755 --- a/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json +++ b/test/fixtures/comments/basic/switch-fallthrough-comment/expected.json @@ -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 - ] + } } ] }, @@ -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 24a358f0e2..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 @@ -170,9 +170,11 @@ "column": 14 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } }, { @@ -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 c3f7926916..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 @@ -514,9 +514,11 @@ "column": 78 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } }, "computed": true @@ -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 - ] + } } ] } @@ -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 79727f2aa4..0a65969bf1 100755 --- a/test/fixtures/comments/basic/switch-no-default-comment/expected.json +++ b/test/fixtures/comments/basic/switch-no-default-comment/expected.json @@ -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 9abc79800a..545b21ce2e 100644 --- a/test/fixtures/core/categorized/regex-after-block/expected.json +++ b/test/fixtures/core/categorized/regex-after-block/expected.json @@ -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 }, @@ -106,11 +105,14 @@ "column": 5 } }, - "raw": "/foo/", + "extra": { + "raw": "/foo/" + }, "pattern": "foo", "flags": "" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/10/expected.json b/test/fixtures/core/uncategorised/10/expected.json index da404948f1..d10391f23b 100644 --- a/test/fixtures/core/uncategorised/10/expected.json +++ b/test/fixtures/core/uncategorised/10/expected.json @@ -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 4b7d0df83e..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": "StringLiteral", + "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 5255b7b53d..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": "StringLiteral", + "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 6146d006c2..46f8894ef5 100644 --- a/test/fixtures/core/uncategorised/102/expected.json +++ b/test/fixtures/core/uncategorised/102/expected.json @@ -87,7 +87,9 @@ "column": 16 } }, - "raw": "/[a-z]/i", + "extra": { + "raw": "/[a-z]/i" + }, "pattern": "[a-z]", "flags": "i" } @@ -95,6 +97,7 @@ ], "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 e5403147fe..c44951e7c8 100644 --- a/test/fixtures/core/uncategorised/103/expected.json +++ b/test/fixtures/core/uncategorised/103/expected.json @@ -87,7 +87,9 @@ "column": 16 } }, - "raw": "/[x-z]/i", + "extra": { + "raw": "/[x-z]/i" + }, "pattern": "[x-z]", "flags": "i" } @@ -95,6 +97,7 @@ ], "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 f998864e01..08a395e815 100644 --- a/test/fixtures/core/uncategorised/104/expected.json +++ b/test/fixtures/core/uncategorised/104/expected.json @@ -87,7 +87,9 @@ "column": 16 } }, - "raw": "/[a-c]/i", + "extra": { + "raw": "/[a-c]/i" + }, "pattern": "[a-c]", "flags": "i" } @@ -95,6 +97,7 @@ ], "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 4119341722..45afd2c5db 100644 --- a/test/fixtures/core/uncategorised/105/expected.json +++ b/test/fixtures/core/uncategorised/105/expected.json @@ -87,7 +87,9 @@ "column": 17 } }, - "raw": "/[P QR]/i", + "extra": { + "raw": "/[P QR]/i" + }, "pattern": "[P QR]", "flags": "i" } @@ -95,6 +97,7 @@ ], "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 323385e36b..80c40e93c1 100644 --- a/test/fixtures/core/uncategorised/106/expected.json +++ b/test/fixtures/core/uncategorised/106/expected.json @@ -87,7 +87,9 @@ "column": 18 } }, - "raw": "/foo\\/bar/", + "extra": { + "raw": "/foo\\/bar/" + }, "pattern": "foo\\/bar", "flags": "" } @@ -95,6 +97,7 @@ ], "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 b973814034..c2c4cdcbb1 100644 --- a/test/fixtures/core/uncategorised/107/expected.json +++ b/test/fixtures/core/uncategorised/107/expected.json @@ -87,7 +87,9 @@ "column": 21 } }, - "raw": "/=([^=\\s])+/g", + "extra": { + "raw": "/=([^=\\s])+/g" + }, "pattern": "=([^=\\s])+", "flags": "g" } @@ -95,6 +97,7 @@ ], "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 533ad1b064..726e72aa5b 100644 --- a/test/fixtures/core/uncategorised/108/expected.json +++ b/test/fixtures/core/uncategorised/108/expected.json @@ -87,7 +87,9 @@ "column": 22 } }, - "raw": "/[P QR]/\\u0067", + "extra": { + "raw": "/[P QR]/\\u0067" + }, "pattern": "[P QR]", "flags": "g" } @@ -95,6 +97,7 @@ ], "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 e011780af1..4c7a7a3493 100644 --- a/test/fixtures/core/uncategorised/11/expected.json +++ b/test/fixtures/core/uncategorised/11/expected.json @@ -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 90a2413a90..5405d8164c 100644 --- a/test/fixtures/core/uncategorised/12/expected.json +++ b/test/fixtures/core/uncategorised/12/expected.json @@ -102,9 +102,11 @@ "column": 7 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, { "type": "NumberLiteral", @@ -120,9 +122,11 @@ "column": 10 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, { "type": "NumberLiteral", @@ -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 f26ab8b935..ec68a20ef6 100644 --- a/test/fixtures/core/uncategorised/124/expected.json +++ b/test/fixtures/core/uncategorised/124/expected.json @@ -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 624c7b81b9..a7a9ccf384 100644 --- a/test/fixtures/core/uncategorised/125/expected.json +++ b/test/fixtures/core/uncategorised/125/expected.json @@ -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 23d090fedc..c94c04107e 100644 --- a/test/fixtures/core/uncategorised/126/expected.json +++ b/test/fixtures/core/uncategorised/126/expected.json @@ -129,9 +129,11 @@ "column": 11 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } ] }, @@ -168,9 +170,11 @@ "column": 24 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 }, { "type": "NumberLiteral", @@ -186,9 +190,11 @@ "column": 27 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 }, { "type": "NumberLiteral", @@ -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 080068549b..b7649d92f8 100644 --- a/test/fixtures/core/uncategorised/127/expected.json +++ b/test/fixtures/core/uncategorised/127/expected.json @@ -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 9bc040d735..f8e8558451 100644 --- a/test/fixtures/core/uncategorised/13/expected.json +++ b/test/fixtures/core/uncategorised/13/expected.json @@ -102,9 +102,11 @@ "column": 7 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, { "type": "NumberLiteral", @@ -120,9 +122,11 @@ "column": 10 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, null, { @@ -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 9252297ac7..0ae6562f5f 100644 --- a/test/fixtures/core/uncategorised/197/expected.json +++ b/test/fixtures/core/uncategorised/197/expected.json @@ -86,9 +86,11 @@ "column": 5 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "alternate": { "type": "NumberLiteral", @@ -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 6d0cf5e9ff..5f5e161e69 100644 --- a/test/fixtures/core/uncategorised/198/expected.json +++ b/test/fixtures/core/uncategorised/198/expected.json @@ -118,9 +118,11 @@ "column": 10 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "alternate": { "type": "NumberLiteral", @@ -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 886a4c91ba..c55cb13771 100644 --- a/test/fixtures/core/uncategorised/199/expected.json +++ b/test/fixtures/core/uncategorised/199/expected.json @@ -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/200/expected.json b/test/fixtures/core/uncategorised/200/expected.json index 087953e749..ccef73317a 100644 --- a/test/fixtures/core/uncategorised/200/expected.json +++ b/test/fixtures/core/uncategorised/200/expected.json @@ -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 c40cefe77a..90279da775 100644 --- a/test/fixtures/core/uncategorised/201/expected.json +++ b/test/fixtures/core/uncategorised/201/expected.json @@ -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 77c0b3f6fd..8c50cdf2f0 100644 --- a/test/fixtures/core/uncategorised/202/expected.json +++ b/test/fixtures/core/uncategorised/202/expected.json @@ -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 3ea5616140..6c210fd1b6 100644 --- a/test/fixtures/core/uncategorised/203/expected.json +++ b/test/fixtures/core/uncategorised/203/expected.json @@ -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 3bb965131c..2c333b70e1 100644 --- a/test/fixtures/core/uncategorised/204/expected.json +++ b/test/fixtures/core/uncategorised/204/expected.json @@ -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 623bec2d65..53c21fe4d6 100644 --- a/test/fixtures/core/uncategorised/205/expected.json +++ b/test/fixtures/core/uncategorised/205/expected.json @@ -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 169b55b357..abc4cb0406 100644 --- a/test/fixtures/core/uncategorised/206/expected.json +++ b/test/fixtures/core/uncategorised/206/expected.json @@ -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 395bbc5959..3c8c2893e8 100644 --- a/test/fixtures/core/uncategorised/207/expected.json +++ b/test/fixtures/core/uncategorised/207/expected.json @@ -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 f2baaf2d7c..cfa8f98dfa 100644 --- a/test/fixtures/core/uncategorised/208/expected.json +++ b/test/fixtures/core/uncategorised/208/expected.json @@ -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 63767ff44b..ff6f9db71d 100644 --- a/test/fixtures/core/uncategorised/209/expected.json +++ b/test/fixtures/core/uncategorised/209/expected.json @@ -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 22bf53cf58..3719a7fafe 100644 --- a/test/fixtures/core/uncategorised/210/expected.json +++ b/test/fixtures/core/uncategorised/210/expected.json @@ -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 52cfe31685..84a3e7d56e 100644 --- a/test/fixtures/core/uncategorised/211/expected.json +++ b/test/fixtures/core/uncategorised/211/expected.json @@ -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 0cb0e23497..456765cc37 100644 --- a/test/fixtures/core/uncategorised/212/expected.json +++ b/test/fixtures/core/uncategorised/212/expected.json @@ -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 746c634e18..1050401744 100644 --- a/test/fixtures/core/uncategorised/218/expected.json +++ b/test/fixtures/core/uncategorised/218/expected.json @@ -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 e88bd0e0af..a1ed3e4b37 100644 --- a/test/fixtures/core/uncategorised/219/expected.json +++ b/test/fixtures/core/uncategorised/219/expected.json @@ -87,9 +87,11 @@ "column": 13 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, { @@ -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 6798856802..0ea258d194 100644 --- a/test/fixtures/core/uncategorised/22/expected.json +++ b/test/fixtures/core/uncategorised/22/expected.json @@ -135,9 +135,11 @@ "column": 16 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "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 f0f1cc157c..db6e0fba4c 100644 --- a/test/fixtures/core/uncategorised/220/expected.json +++ b/test/fixtures/core/uncategorised/220/expected.json @@ -87,9 +87,11 @@ "column": 10 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -136,9 +138,11 @@ "column": 17 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -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 7d1d29919f..6000da8339 100644 --- a/test/fixtures/core/uncategorised/23/expected.json +++ b/test/fixtures/core/uncategorised/23/expected.json @@ -135,9 +135,11 @@ "column": 12 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "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 086e802703..02fd006838 100644 --- a/test/fixtures/core/uncategorised/230/expected.json +++ b/test/fixtures/core/uncategorised/230/expected.json @@ -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 298c6ed2b8..52f64a4d6b 100644 --- a/test/fixtures/core/uncategorised/232/expected.json +++ b/test/fixtures/core/uncategorised/232/expected.json @@ -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 cf9db0e4fd..04998adb58 100644 --- a/test/fixtures/core/uncategorised/233/expected.json +++ b/test/fixtures/core/uncategorised/233/expected.json @@ -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 3bd687b08d..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", @@ -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 5f92a264ce..e012c017fe 100644 --- a/test/fixtures/core/uncategorised/235/expected.json +++ b/test/fixtures/core/uncategorised/235/expected.json @@ -71,7 +71,8 @@ "column": 8 } }, - "body": [] + "body": [], + "directives": [] }, "test": { "type": "BooleanLiteral", @@ -87,9 +88,7 @@ "column": 21 } }, - "value": false, - "rawValue": false, - "raw": "false" + "value": false } }, { @@ -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 b68c4e6106..b154f386f7 100644 --- a/test/fixtures/core/uncategorised/236/expected.json +++ b/test/fixtures/core/uncategorised/236/expected.json @@ -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 c7381370ab..0ca7f0f400 100644 --- a/test/fixtures/core/uncategorised/237/expected.json +++ b/test/fixtures/core/uncategorised/237/expected.json @@ -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 80a4774e20..a958d6780e 100644 --- a/test/fixtures/core/uncategorised/24/expected.json +++ b/test/fixtures/core/uncategorised/24/expected.json @@ -135,9 +135,11 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "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 f45ca7088d..3b790cdecf 100644 --- a/test/fixtures/core/uncategorised/240/expected.json +++ b/test/fixtures/core/uncategorised/240/expected.json @@ -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 6640f73295..e7c1db4ec7 100644 --- a/test/fixtures/core/uncategorised/241/expected.json +++ b/test/fixtures/core/uncategorised/241/expected.json @@ -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 61391fdd9f..eacbe24384 100644 --- a/test/fixtures/core/uncategorised/242/expected.json +++ b/test/fixtures/core/uncategorised/242/expected.json @@ -101,9 +101,11 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, { @@ -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 fb76721dce..7f485aaf19 100644 --- a/test/fixtures/core/uncategorised/243/expected.json +++ b/test/fixtures/core/uncategorised/243/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -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 f826f885de..0c6bf2a092 100644 --- a/test/fixtures/core/uncategorised/244/expected.json +++ b/test/fixtures/core/uncategorised/244/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -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 16f684a226..586cbf67f5 100644 --- a/test/fixtures/core/uncategorised/245/expected.json +++ b/test/fixtures/core/uncategorised/245/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -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/25/expected.json b/test/fixtures/core/uncategorised/25/expected.json index a6a31f5362..d4911b1226 100644 --- a/test/fixtures/core/uncategorised/25/expected.json +++ b/test/fixtures/core/uncategorised/25/expected.json @@ -135,9 +135,11 @@ "column": 15 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "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 40763456b0..16edee2512 100644 --- a/test/fixtures/core/uncategorised/250/expected.json +++ b/test/fixtures/core/uncategorised/250/expected.json @@ -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 bfea074cf1..d58d0ffa9a 100644 --- a/test/fixtures/core/uncategorised/251/expected.json +++ b/test/fixtures/core/uncategorised/251/expected.json @@ -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 f43031468c..3d3611769c 100644 --- a/test/fixtures/core/uncategorised/252/expected.json +++ b/test/fixtures/core/uncategorised/252/expected.json @@ -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 3b684f46cb..e2eede95cf 100644 --- a/test/fixtures/core/uncategorised/253/expected.json +++ b/test/fixtures/core/uncategorised/253/expected.json @@ -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 15042df691..e27a473406 100644 --- a/test/fixtures/core/uncategorised/254/expected.json +++ b/test/fixtures/core/uncategorised/254/expected.json @@ -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 be48009734..930203bdfe 100644 --- a/test/fixtures/core/uncategorised/255/expected.json +++ b/test/fixtures/core/uncategorised/255/expected.json @@ -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 6c31c586d6..207d4cf4c5 100644 --- a/test/fixtures/core/uncategorised/256/expected.json +++ b/test/fixtures/core/uncategorised/256/expected.json @@ -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 e516e972e9..61e13ba2b5 100644 --- a/test/fixtures/core/uncategorised/26/expected.json +++ b/test/fixtures/core/uncategorised/26/expected.json @@ -135,9 +135,11 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "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 9758d61707..6251d143ae 100644 --- a/test/fixtures/core/uncategorised/269/expected.json +++ b/test/fixtures/core/uncategorised/269/expected.json @@ -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 96a8fd0d09..e7f3c00497 100644 --- a/test/fixtures/core/uncategorised/27/expected.json +++ b/test/fixtures/core/uncategorised/27/expected.json @@ -119,9 +119,11 @@ "column": 14 } }, - "value": "answer", - "rawValue": "answer", - "raw": "\"answer\"" + "extra": { + "rawValue": "answer", + "raw": "\"answer\"" + }, + "value": "answer" }, "value": { "type": "NumberLiteral", @@ -137,9 +139,11 @@ "column": 18 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -147,6 +151,7 @@ } } } - ] + ], + "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 7400509d5f..96908f65a6 100644 --- a/test/fixtures/core/uncategorised/270/expected.json +++ b/test/fixtures/core/uncategorised/270/expected.json @@ -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 c4f9e0e386..5157602658 100644 --- a/test/fixtures/core/uncategorised/272/expected.json +++ b/test/fixtures/core/uncategorised/272/expected.json @@ -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 dc9afaed76..0ddcce0c63 100644 --- a/test/fixtures/core/uncategorised/275/expected.json +++ b/test/fixtures/core/uncategorised/275/expected.json @@ -104,15 +104,18 @@ "column": 24 } }, - "value": "Error", - "rawValue": "Error", - "raw": "\"Error\"" + "extra": { + "rawValue": "Error", + "raw": "\"Error\"" + }, + "value": "Error" }, "kind": "init" } ] } } - ] + ], + "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 d754d81e2b..d7de811e96 100644 --- a/test/fixtures/core/uncategorised/28/expected.json +++ b/test/fixtures/core/uncategorised/28/expected.json @@ -135,9 +135,11 @@ "column": 10 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "kind": "init" }, @@ -188,9 +190,11 @@ "column": 16 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "kind": "init" } @@ -198,6 +202,7 @@ } } } - ] + ], + "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 f5013969f2..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": "StringLiteral", + "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/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 778ef2fe98..1c7de0b706 100644 --- a/test/fixtures/core/uncategorised/3/expected.json +++ b/test/fixtures/core/uncategorised/3/expected.json @@ -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/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 b3c4b6a133..607612e873 100644 --- a/test/fixtures/core/uncategorised/303/expected.json +++ b/test/fixtures/core/uncategorised/303/expected.json @@ -102,9 +102,11 @@ "column": 12 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -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 253be28d97..1c02f6ef66 100644 --- a/test/fixtures/core/uncategorised/304/expected.json +++ b/test/fixtures/core/uncategorised/304/expected.json @@ -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 567f02ad8f..675fe056a3 100644 --- a/test/fixtures/core/uncategorised/305/expected.json +++ b/test/fixtures/core/uncategorised/305/expected.json @@ -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,18 +154,16 @@ "line": 1, "column": 34 } - }, - "range": [ - 24, - 34 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 1, "column": 34 } - }, - "range": [ - 24, - 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 b094efe11f..dfef6b5c50 100644 --- a/test/fixtures/core/uncategorised/306/expected.json +++ b/test/fixtures/core/uncategorised/306/expected.json @@ -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,18 +154,16 @@ "line": 2, "column": 10 } - }, - "range": [ - 24, - 47 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 24, - 47 - ] + } } ] } \ 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 be91d94441..2b8d9fef9f 100644 --- a/test/fixtures/core/uncategorised/307/expected.json +++ b/test/fixtures/core/uncategorised/307/expected.json @@ -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 2fc3f311ee..21c911cbbc 100644 --- a/test/fixtures/core/uncategorised/308/expected.json +++ b/test/fixtures/core/uncategorised/308/expected.json @@ -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,18 +154,16 @@ "line": 1, "column": 31 } - }, - "range": [ - 21, - 31 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 1, "column": 31 } - }, - "range": [ - 21, - 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 6720b43723..55ac6a29a8 100644 --- a/test/fixtures/core/uncategorised/309/expected.json +++ b/test/fixtures/core/uncategorised/309/expected.json @@ -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,18 +154,16 @@ "line": 2, "column": 10 } - }, - "range": [ - 21, - 44 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 21, - 44 - ] + } } ] } \ 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 77f0623dd0..96b5884573 100644 --- a/test/fixtures/core/uncategorised/317/expected.json +++ b/test/fixtures/core/uncategorised/317/expected.json @@ -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 a9f877830b..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": "StringLiteral", + "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": "StringLiteral", + "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 c8465306e7..61133f8ac6 100644 --- a/test/fixtures/core/uncategorised/319/expected.json +++ b/test/fixtures/core/uncategorised/319/expected.json @@ -84,9 +84,11 @@ "column": 4 } }, - "value": 123, - "rawValue": 123, - "raw": "123." + "extra": { + "rawValue": 123, + "raw": "123." + }, + "value": 123 }, "property": { "type": "Identifier", @@ -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/320/expected.json b/test/fixtures/core/uncategorised/320/expected.json index dfcf159a6b..da052c6d87 100644 --- a/test/fixtures/core/uncategorised/320/expected.json +++ b/test/fixtures/core/uncategorised/320/expected.json @@ -70,9 +70,11 @@ "column": 4 } }, - "value": 123, - "rawValue": 123, - "raw": "123." + "extra": { + "rawValue": 123, + "raw": "123." + }, + "value": 123 }, "operator": "+", "right": { @@ -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 312ab26090..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": "StringLiteral", + "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 a3669a1658..583c34687b 100644 --- a/test/fixtures/core/uncategorised/323/expected.json +++ b/test/fixtures/core/uncategorised/323/expected.json @@ -70,9 +70,11 @@ "column": 7 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } }, "label": { @@ -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 5409838244..41b1dcbac8 100644 --- a/test/fixtures/core/uncategorised/324/expected.json +++ b/test/fixtures/core/uncategorised/324/expected.json @@ -56,9 +56,11 @@ "column": 4 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "consequent": { "type": "ExpressionStatement", @@ -88,13 +90,16 @@ "column": 12 } }, - "raw": "/ foo/", + "extra": { + "raw": "/ foo/" + }, "pattern": " foo", "flags": "" } }, "alternate": null } - ] + ], + "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 599c268bdf..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", @@ -72,11 +73,14 @@ "column": 5 } }, - "raw": "/=/", + "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 16ef7df684..d2ed65cb86 100644 --- a/test/fixtures/core/uncategorised/343/expected.json +++ b/test/fixtures/core/uncategorised/343/expected.json @@ -135,9 +135,11 @@ "column": 10 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } }, @@ -156,15 +158,12 @@ "line": 2, "column": 12 } - }, - "range": [ - 13, - 24 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -181,11 +180,7 @@ "line": 2, "column": 12 } - }, - "range": [ - 13, - 24 - ] + } } ] } \ 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 c8acee55d3..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": "StringLiteral", - "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 929aaebf51..da3ec9be77 100644 --- a/test/fixtures/core/uncategorised/35/expected.json +++ b/test/fixtures/core/uncategorised/35/expected.json @@ -119,9 +119,11 @@ "column": 17 } }, - "value": "undef", - "rawValue": "undef", - "raw": "\"undef\"" + "extra": { + "rawValue": "undef", + "raw": "\"undef\"" + }, + "value": "undef" }, "kind": "get", "value": { @@ -156,7 +158,8 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -164,6 +167,7 @@ } } } - ] + ], + "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 2249562b63..a7cfe82d4d 100644 --- a/test/fixtures/core/uncategorised/36/expected.json +++ b/test/fixtures/core/uncategorised/36/expected.json @@ -119,9 +119,11 @@ "column": 12 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "get", "value": { @@ -156,7 +158,8 @@ "column": 17 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -164,6 +167,7 @@ } } } - ] + ], + "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 cfa64792cf..850ccec0d7 100644 --- a/test/fixtures/core/uncategorised/4/expected.json +++ b/test/fixtures/core/uncategorised/4/expected.json @@ -56,11 +56,14 @@ "column": 8 } }, - "raw": "/foobar/", + "extra": { + "raw": "/foobar/" + }, "pattern": "foobar", "flags": "" } } - ] + ], + "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 e1c3ca9d7e..359994f749 100644 --- a/test/fixtures/core/uncategorised/42/expected.json +++ b/test/fixtures/core/uncategorised/42/expected.json @@ -119,9 +119,11 @@ "column": 16 } }, - "value": "null", - "rawValue": "null", - "raw": "\"null\"" + "extra": { + "rawValue": "null", + "raw": "\"null\"" + }, + "value": "null" }, "kind": "set", "value": { @@ -237,7 +239,8 @@ } } } - ] + ], + "directives": [] } } } @@ -245,6 +248,7 @@ } } } - ] + ], + "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 831c152d07..40439f6021 100644 --- a/test/fixtures/core/uncategorised/43/expected.json +++ b/test/fixtures/core/uncategorised/43/expected.json @@ -119,9 +119,11 @@ "column": 12 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "set", "value": { @@ -237,7 +239,8 @@ } } } - ] + ], + "directives": [] } } } @@ -245,6 +248,7 @@ } } } - ] + ], + "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 22361a57aa..717aa6f7e7 100644 --- a/test/fixtures/core/uncategorised/44/expected.json +++ b/test/fixtures/core/uncategorised/44/expected.json @@ -135,9 +135,11 @@ "column": 13 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "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 96f2955db3..01d280ce5b 100644 --- a/test/fixtures/core/uncategorised/45/expected.json +++ b/test/fixtures/core/uncategorised/45/expected.json @@ -135,9 +135,11 @@ "column": 13 } }, - "value": 43, - "rawValue": 43, - "raw": "43" + "extra": { + "rawValue": 43, + "raw": "43" + }, + "value": 43 }, "kind": "init" } @@ -145,6 +147,7 @@ } } } - ] + ], + "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 dd2e0291b4..777ab9a74e 100644 --- a/test/fixtures/core/uncategorised/46/expected.json +++ b/test/fixtures/core/uncategorised/46/expected.json @@ -56,9 +56,11 @@ "column": 22 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 1, "column": 19 } - }, - "range": [ - 0, - 19 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 1, "column": 19 } - }, - "range": [ - 0, - 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 850a6eaa47..0955aa94d2 100644 --- a/test/fixtures/core/uncategorised/47/expected.json +++ b/test/fixtures/core/uncategorised/47/expected.json @@ -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,15 +95,12 @@ "line": 1, "column": 21 } - }, - "range": [ - 11, - 21 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -122,11 +117,7 @@ "line": 1, "column": 10 } - }, - "range": [ - 3, - 10 - ] + } }, { "type": "CommentBlock", @@ -142,11 +133,7 @@ "line": 1, "column": 21 } - }, - "range": [ - 11, - 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 128dc0844c..df6c839351 100644 --- a/test/fixtures/core/uncategorised/48/expected.json +++ b/test/fixtures/core/uncategorised/48/expected.json @@ -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,15 +95,12 @@ "line": 1, "column": 21 } - }, - "range": [ - 11, - 21 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -122,11 +117,7 @@ "line": 1, "column": 10 } - }, - "range": [ - 3, - 10 - ] + } }, { "type": "CommentBlock", @@ -142,11 +133,7 @@ "line": 1, "column": 21 } - }, - "range": [ - 11, - 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/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/49/expected.json b/test/fixtures/core/uncategorised/49/expected.json index f60e121523..e9267064e8 100644 --- a/test/fixtures/core/uncategorised/49/expected.json +++ b/test/fixtures/core/uncategorised/49/expected.json @@ -56,9 +56,11 @@ "column": 13 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 5, "column": 10 } - }, - "range": [ - 0, - 41 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 5, "column": 10 } - }, - "range": [ - 0, - 41 - ] + } } ] } \ 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/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/esprima/statement-iteration/migrated_0019/expected.json b/test/fixtures/core/uncategorised/497/expected.json similarity index 50% rename from test/fixtures/esprima/statement-iteration/migrated_0019/expected.json rename to test/fixtures/core/uncategorised/497/expected.json index 7b65e7a6c3..8425a41fb7 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0019/expected.json +++ b/test/fixtures/core/uncategorised/497/expected.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 36, + "end": 58, "loc": { "start": { "line": 1, @@ -9,13 +9,13 @@ }, "end": { "line": 1, - "column": 36 + "column": 58 } }, "program": { "type": "Program", "start": 0, - "end": 36, + "end": 58, "loc": { "start": { "line": 1, @@ -23,15 +23,15 @@ }, "end": { "line": 1, - "column": 36 + "column": 58 } }, "sourceType": "script", "body": [ { - "type": "ForInStatement", + "type": "FunctionDeclaration", "start": 0, - "end": 36, + "end": 58, "loc": { "start": { "line": 1, @@ -39,157 +39,149 @@ }, "end": { "line": 1, - "column": 36 + "column": 58 } }, - "left": { - "type": "VariableDeclaration", - "start": 5, - "end": 15, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, "loc": { "start": { "line": 1, - "column": 5 + "column": 9 }, "end": { "line": 1, - "column": 15 + "column": 14 } }, - "declarations": [ + "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": "VariableDeclarator", - "start": 9, - "end": 15, + "type": "FunctionDeclaration", + "start": 33, + "end": 56, "loc": { "start": { "line": 1, - "column": 9 + "column": 33 }, "end": { "line": 1, - "column": 15 + "column": 56 } }, "id": { "type": "Identifier", - "start": 9, - "end": 10, + "start": 42, + "end": 47, "loc": { "start": { "line": 1, - "column": 9 + "column": 42 }, "end": { "line": 1, - "column": 10 + "column": 47 } }, - "name": "x" + "name": "inner" }, - "init": { - "type": "Literal", - "start": 13, - "end": 15, + "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": 13 + "column": 54 }, "end": { "line": 1, - "column": 15 + "column": 56 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "body": [], + "directives": [] } } ], - "kind": "var" - }, - "right": { - "type": "Identifier", - "start": 19, - "end": 23, - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 23 - } - }, - "name": "list" - }, - "body": { - "type": "ExpressionStatement", - "start": 25, - "end": 36, - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 36 - } - }, - "expression": { - "type": "CallExpression", - "start": 25, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 35 - } - }, - "callee": { - "type": "Identifier", - "start": 25, + "directives": [ + { + "type": "Directive", + "start": 19, "end": 32, "loc": { "start": { "line": 1, - "column": 25 + "column": 19 }, "end": { "line": 1, "column": 32 } }, - "name": "process" - }, - "arguments": [ - { - "type": "Identifier", - "start": 33, - "end": 34, + "value": { + "type": "DirectiveLiteral", + "start": 19, + "end": 31, "loc": { "start": { "line": 1, - "column": 33 + "column": 19 }, "end": { "line": 1, - "column": 34 + "column": 31 } }, - "name": "x" + "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 00b6bbab99..9311593726 100644 --- a/test/fixtures/core/uncategorised/5/expected.json +++ b/test/fixtures/core/uncategorised/5/expected.json @@ -56,11 +56,14 @@ "column": 8 } }, - "raw": "/[a-z]/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 1941345514..1bead36e26 100644 --- a/test/fixtures/core/uncategorised/50/expected.json +++ b/test/fixtures/core/uncategorised/50/expected.json @@ -56,9 +56,11 @@ "column": 6 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } \ 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/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/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/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/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/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/51/expected.json b/test/fixtures/core/uncategorised/51/expected.json index a6794f44ff..4ea801a13a 100644 --- a/test/fixtures/core/uncategorised/51/expected.json +++ b/test/fixtures/core/uncategorised/51/expected.json @@ -56,9 +56,11 @@ "column": 6 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } \ 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/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/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/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 1941345514..1bead36e26 100644 --- a/test/fixtures/core/uncategorised/52/expected.json +++ b/test/fixtures/core/uncategorised/52/expected.json @@ -56,9 +56,11 @@ "column": 6 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } \ 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 966e0d2d6f..719450f6db 100644 --- a/test/fixtures/core/uncategorised/527/expected.json +++ b/test/fixtures/core/uncategorised/527/expected.json @@ -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 fc6d35a712..d67d0ff9c0 100644 --- a/test/fixtures/core/uncategorised/528/expected.json +++ b/test/fixtures/core/uncategorised/528/expected.json @@ -87,9 +87,11 @@ "column": 13 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, { @@ -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 bd5767e5df..97407a93a7 100644 --- a/test/fixtures/core/uncategorised/529/expected.json +++ b/test/fixtures/core/uncategorised/529/expected.json @@ -87,9 +87,11 @@ "column": 10 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -136,9 +138,11 @@ "column": 17 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -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 3b798c3d36..5ae353a2f6 100644 --- a/test/fixtures/core/uncategorised/53/expected.json +++ b/test/fixtures/core/uncategorised/53/expected.json @@ -56,9 +56,11 @@ "column": 6 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 2, "column": 3 } - }, - "range": [ - 0, - 7 - ] + } } ] } \ 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 e10d00d731..c6da62d7c5 100644 --- a/test/fixtures/core/uncategorised/530/expected.json +++ b/test/fixtures/core/uncategorised/530/expected.json @@ -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 3d38c67b22..161b25fb1e 100644 --- a/test/fixtures/core/uncategorised/531/expected.json +++ b/test/fixtures/core/uncategorised/531/expected.json @@ -101,9 +101,11 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, { @@ -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 dcf8a26650..4069780390 100644 --- a/test/fixtures/core/uncategorised/533/expected.json +++ b/test/fixtures/core/uncategorised/533/expected.json @@ -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 3a6addea10..a000184562 100644 --- a/test/fixtures/core/uncategorised/534/expected.json +++ b/test/fixtures/core/uncategorised/534/expected.json @@ -87,9 +87,11 @@ "column": 15 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, { @@ -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 15ba33cd4d..a40092b09d 100644 --- a/test/fixtures/core/uncategorised/535/expected.json +++ b/test/fixtures/core/uncategorised/535/expected.json @@ -87,9 +87,11 @@ "column": 12 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -136,9 +138,11 @@ "column": 19 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -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/537/expected.json b/test/fixtures/core/uncategorised/537/expected.json index 50fd4d6345..7ffb7b7416 100644 --- a/test/fixtures/core/uncategorised/537/expected.json +++ b/test/fixtures/core/uncategorised/537/expected.json @@ -101,9 +101,11 @@ "column": 15 } }, - "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/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 526710b150..b94af6a6f3 100644 --- a/test/fixtures/core/uncategorised/54/expected.json +++ b/test/fixtures/core/uncategorised/54/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 1, "column": 15 } - }, - "range": [ - 0, - 15 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 1, "column": 15 } - }, - "range": [ - 0, - 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 3b9f0e4448..5b46bc550d 100644 --- a/test/fixtures/core/uncategorised/540/expected.json +++ b/test/fixtures/core/uncategorised/540/expected.json @@ -88,7 +88,8 @@ "column": 15 } }, - "body": [] + "body": [], + "directives": [] } }, "operator": "/", @@ -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 93d8cd375b..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": [] } }, { @@ -106,11 +107,14 @@ "column": 21 } }, - "raw": "/ 1 /", + "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 b400dbe706..e8663de8a9 100644 --- a/test/fixtures/core/uncategorised/55/expected.json +++ b/test/fixtures/core/uncategorised/55/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null, "trailingComments": null }, @@ -77,15 +79,12 @@ "line": 1, "column": 18 } - }, - "range": [ - 3, - 18 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -102,11 +101,7 @@ "line": 1, "column": 18 } - }, - "range": [ - 3, - 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 337ed51862..8ba4e0ec1b 100644 --- a/test/fixtures/core/uncategorised/56/expected.json +++ b/test/fixtures/core/uncategorised/56/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 1, "column": 16 } - }, - "range": [ - 0, - 16 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 1, "column": 16 } - }, - "range": [ - 0, - 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 4ab335adab..87f7fb03ef 100644 --- a/test/fixtures/core/uncategorised/59/expected.json +++ b/test/fixtures/core/uncategorised/59/expected.json @@ -56,9 +56,11 @@ "column": 2 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 1, "column": 2 } - }, - "range": [ - 0, - 2 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 1, "column": 2 } - }, - "range": [ - 0, - 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 deaf7c1729..44268abd43 100644 --- a/test/fixtures/core/uncategorised/6/expected.json +++ b/test/fixtures/core/uncategorised/6/expected.json @@ -84,9 +84,11 @@ "column": 2 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "operator": "+", "right": { @@ -103,11 +105,15 @@ "column": 6 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "operator": "*", "right": { @@ -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 3b0389e5d0..2cf6359c5d 100644 --- a/test/fixtures/core/uncategorised/62/expected.json +++ b/test/fixtures/core/uncategorised/62/expected.json @@ -56,9 +56,11 @@ "column": 6 } }, + "extra": { + "rawValue": 42, + "raw": "42" + }, "value": 42, - "rawValue": 42, - "raw": "42", "leadingComments": null }, "leadingComments": [ @@ -76,15 +78,12 @@ "line": 1, "column": 4 } - }, - "range": [ - 0, - 4 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -101,11 +100,7 @@ "line": 1, "column": 4 } - }, - "range": [ - 0, - 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 291f749462..ddafd34d4b 100644 --- a/test/fixtures/core/uncategorised/63/expected.json +++ b/test/fixtures/core/uncategorised/63/expected.json @@ -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,15 +94,12 @@ "line": 3, "column": 18 } - }, - "range": [ - 18, - 36 - ] + } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -121,11 +116,7 @@ "line": 1, "column": 16 } - }, - "range": [ - 0, - 16 - ] + } }, { "type": "CommentLine", @@ -141,11 +132,7 @@ "line": 3, "column": 18 } - }, - "range": [ - 18, - 36 - ] + } } ] } \ 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 2d16fc17b9..346b21d465 100644 --- a/test/fixtures/core/uncategorised/65/expected.json +++ b/test/fixtures/core/uncategorised/65/expected.json @@ -137,11 +137,7 @@ "line": 1, "column": 40 } - }, - "range": [ - 27, - 40 - ] + } } ] } @@ -160,14 +156,17 @@ "column": 25 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ] } - ] + ], + "directives": [] }, "comments": [ { @@ -184,11 +183,7 @@ "line": 1, "column": 40 } - }, - "range": [ - 27, - 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 ee7c3c8a44..d50639ea1d 100644 --- a/test/fixtures/core/uncategorised/66/expected.json +++ b/test/fixtures/core/uncategorised/66/expected.json @@ -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 4e90f25295..7bbd5d6e04 100644 --- a/test/fixtures/core/uncategorised/67/expected.json +++ b/test/fixtures/core/uncategorised/67/expected.json @@ -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 5c479ec64e..31f49f4d54 100644 --- a/test/fixtures/core/uncategorised/68/expected.json +++ b/test/fixtures/core/uncategorised/68/expected.json @@ -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 674c028642..d507dabac4 100644 --- a/test/fixtures/core/uncategorised/69/expected.json +++ b/test/fixtures/core/uncategorised/69/expected.json @@ -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 d8fd4c0959..bc9495e7c4 100644 --- a/test/fixtures/core/uncategorised/70/expected.json +++ b/test/fixtures/core/uncategorised/70/expected.json @@ -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 c65f80bc71..f0d5e69680 100644 --- a/test/fixtures/core/uncategorised/71/expected.json +++ b/test/fixtures/core/uncategorised/71/expected.json @@ -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 6c9bd55f71..c60b1b41f8 100644 --- a/test/fixtures/core/uncategorised/72/expected.json +++ b/test/fixtures/core/uncategorised/72/expected.json @@ -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 8aa93e63cc..3c13fede57 100644 --- a/test/fixtures/core/uncategorised/73/expected.json +++ b/test/fixtures/core/uncategorised/73/expected.json @@ -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 532733a4dd..89c0277df0 100644 --- a/test/fixtures/core/uncategorised/74/expected.json +++ b/test/fixtures/core/uncategorised/74/expected.json @@ -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 58b2f24c7a..ff1823f7ed 100644 --- a/test/fixtures/core/uncategorised/75/expected.json +++ b/test/fixtures/core/uncategorised/75/expected.json @@ -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 ceaa8c3a17..6c610fe45d 100644 --- a/test/fixtures/core/uncategorised/76/expected.json +++ b/test/fixtures/core/uncategorised/76/expected.json @@ -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 f80d7c9cd5..925c9bd4b5 100644 --- a/test/fixtures/core/uncategorised/77/expected.json +++ b/test/fixtures/core/uncategorised/77/expected.json @@ -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 75950798ba..b22782d94a 100644 --- a/test/fixtures/core/uncategorised/78/expected.json +++ b/test/fixtures/core/uncategorised/78/expected.json @@ -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 3ec2521ed5..f5b4ed8462 100644 --- a/test/fixtures/core/uncategorised/79/expected.json +++ b/test/fixtures/core/uncategorised/79/expected.json @@ -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 c9510f36fa..f677a72fed 100644 --- a/test/fixtures/core/uncategorised/80/expected.json +++ b/test/fixtures/core/uncategorised/80/expected.json @@ -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 dd38ee8475..0ad2ff57eb 100644 --- a/test/fixtures/core/uncategorised/81/expected.json +++ b/test/fixtures/core/uncategorised/81/expected.json @@ -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 e4985f2b1e..eb09e24858 100644 --- a/test/fixtures/core/uncategorised/82/expected.json +++ b/test/fixtures/core/uncategorised/82/expected.json @@ -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 8bb1dbdaf8..00009bf130 100644 --- a/test/fixtures/core/uncategorised/83/expected.json +++ b/test/fixtures/core/uncategorised/83/expected.json @@ -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 74b4910c7c..febf934ba3 100644 --- a/test/fixtures/core/uncategorised/84/expected.json +++ b/test/fixtures/core/uncategorised/84/expected.json @@ -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 75243c6d6a..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": "StringLiteral", + "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 db9d18218f..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": "StringLiteral", + "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 21ac4d0633..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": "StringLiteral", + "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 d98bbbf345..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": "StringLiteral", + "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 fb56f80c47..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": "StringLiteral", + "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 bd8886934c..be72c57c4e 100644 --- a/test/fixtures/core/uncategorised/9/expected.json +++ b/test/fixtures/core/uncategorised/9/expected.json @@ -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 4b7d0df83e..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": "StringLiteral", + "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 7f2af71438..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": "StringLiteral", + "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 36c8089dfa..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": "StringLiteral", + "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 73355963c0..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": "StringLiteral", + "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 7fa2454d0e..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": "StringLiteral", + "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 f76c3f06ba..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": "StringLiteral", + "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 e3c5d34073..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": "StringLiteral", + "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 313e3477d2..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": "StringLiteral", + "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 ec00b5c923..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": "StringLiteral", + "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 bdb5012bd7..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": "StringLiteral", + "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/automatic-semicolon-insertion/migrated_0002/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json index bfca2ac2a5..b80d317427 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0002/expected.json @@ -91,18 +91,15 @@ "line": 1, "column": 19 } - }, - "range": [ - 6, - 19 - ] + } } ] } ], "kind": "var" } - ] + ], + "directives": [] }, "comments": [ { @@ -119,11 +116,7 @@ "line": 1, "column": 19 } - }, - "range": [ - 6, - 19 - ] + } } ] } \ No newline at end of file diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json index b3c4b6a133..607612e873 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0003/expected.json @@ -102,9 +102,11 @@ "column": 12 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -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/esprima/automatic-semicolon-insertion/migrated_0004/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json index 253be28d97..1c02f6ef66 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0004/expected.json @@ -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/esprima/automatic-semicolon-insertion/migrated_0005/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json index 567f02ad8f..675fe056a3 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0005/expected.json @@ -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,18 +154,16 @@ "line": 1, "column": 34 } - }, - "range": [ - 24, - 34 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 1, "column": 34 } - }, - "range": [ - 24, - 34 - ] + } } ] } \ No newline at end of file diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json index b094efe11f..dfef6b5c50 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0006/expected.json @@ -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,18 +154,16 @@ "line": 2, "column": 10 } - }, - "range": [ - 24, - 47 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 24, - 47 - ] + } } ] } \ No newline at end of file diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json index be91d94441..2b8d9fef9f 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0007/expected.json @@ -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/esprima/automatic-semicolon-insertion/migrated_0008/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json index 2fc3f311ee..21c911cbbc 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0008/expected.json @@ -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,18 +154,16 @@ "line": 1, "column": 31 } - }, - "range": [ - 21, - 31 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 1, "column": 31 } - }, - "range": [ - 21, - 31 - ] + } } ] } \ No newline at end of file diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json index 6720b43723..55ac6a29a8 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0009/expected.json @@ -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,18 +154,16 @@ "line": 2, "column": 10 } - }, - "range": [ - 21, - 44 - ] + } } ] } - ] + ], + "directives": [] } } - ] + ], + "directives": [] }, "comments": [ { @@ -188,11 +180,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 21, - 44 - ] + } } ] } \ No newline at end of file diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json index 9098864a2b..7d4c8d5bb6 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0010/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/esprima/automatic-semicolon-insertion/migrated_0011/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json index 8c387c91d1..f0cf8a4b53 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0011/expected.json @@ -106,11 +106,7 @@ "line": 1, "column": 30 } - }, - "range": [ - 20, - 30 - ] + } } ] }, @@ -160,20 +156,20 @@ "line": 1, "column": 30 } - }, - "range": [ - 20, - 30 - ] + } } ] } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] }, "comments": [ { @@ -190,11 +186,7 @@ "line": 1, "column": 30 } - }, - "range": [ - 20, - 30 - ] + } } ] } \ No newline at end of file diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json index 2eb4083a3c..975bfdf605 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0012/expected.json @@ -106,11 +106,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 19, - 42 - ] + } } ] }, @@ -160,20 +156,20 @@ "line": 2, "column": 10 } - }, - "range": [ - 19, - 42 - ] + } } ] } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] }, "comments": [ { @@ -190,11 +186,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 19, - 42 - ] + } } ] } \ No newline at end of file diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json index 59760cfccf..1340d70360 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0014/expected.json @@ -90,11 +90,7 @@ "line": 1, "column": 23 } - }, - "range": [ - 13, - 23 - ] + } } ] }, @@ -144,17 +140,15 @@ "line": 1, "column": 23 } - }, - "range": [ - 13, - 23 - ] + } } ] } - ] + ], + "directives": [] } - ] + ], + "directives": [] }, "comments": [ { @@ -171,11 +165,7 @@ "line": 1, "column": 23 } - }, - "range": [ - 13, - 23 - ] + } } ] } \ No newline at end of file diff --git a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json index 316c90a92c..fcf481f414 100644 --- a/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json +++ b/test/fixtures/esprima/automatic-semicolon-insertion/migrated_0015/expected.json @@ -90,11 +90,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 13, - 36 - ] + } } ] }, @@ -144,17 +140,15 @@ "line": 2, "column": 10 } - }, - "range": [ - 13, - 36 - ] + } } ] } - ] + ], + "directives": [] } - ] + ], + "directives": [] }, "comments": [ { @@ -171,11 +165,7 @@ "line": 2, "column": 10 } - }, - "range": [ - 13, - 36 - ] + } } ] } \ No newline at end of file diff --git a/test/fixtures/esprima/declaration-const/migrated_0000/expected.json b/test/fixtures/esprima/declaration-const/migrated_0000/expected.json index dcf8a26650..4069780390 100644 --- a/test/fixtures/esprima/declaration-const/migrated_0000/expected.json +++ b/test/fixtures/esprima/declaration-const/migrated_0000/expected.json @@ -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/esprima/declaration-const/migrated_0001/expected.json b/test/fixtures/esprima/declaration-const/migrated_0001/expected.json index 8b63e6bb33..b6f5990bca 100644 --- a/test/fixtures/esprima/declaration-const/migrated_0001/expected.json +++ b/test/fixtures/esprima/declaration-const/migrated_0001/expected.json @@ -102,16 +102,20 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "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/expected.json b/test/fixtures/esprima/declaration-const/migrated_0002/expected.json index 55718cfc43..4618734fda 100644 --- a/test/fixtures/esprima/declaration-const/migrated_0002/expected.json +++ b/test/fixtures/esprima/declaration-const/migrated_0002/expected.json @@ -102,9 +102,11 @@ "column": 14 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -151,9 +153,11 @@ "column": 21 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -200,16 +204,20 @@ "column": 31 } }, - "value": 1977, - "rawValue": 1977, - "raw": "1977" + "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/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/empty-param/expected.json b/test/fixtures/esprima/declaration-function/empty-param/expected.json index 959d6454f7..554eee01b4 100644 --- a/test/fixtures/esprima/declaration-function/empty-param/expected.json +++ b/test/fixtures/esprima/declaration-function/empty-param/expected.json @@ -108,9 +108,10 @@ "column": 34 } }, - "body": [ + "body": [], + "directives": [ { - "type": "ExpressionStatement", + "type": "Directive", "start": 20, "end": 33, "loc": { @@ -123,8 +124,8 @@ "column": 33 } }, - "expression": { - "type": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 20, "end": 32, "loc": { @@ -138,13 +139,16 @@ } }, "value": "use strict", - "rawValue": "use strict", - "raw": "'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_0004/expected.json b/test/fixtures/esprima/declaration-function/migrated_0004/expected.json index 246b6b5a20..a9c517251e 100644 --- a/test/fixtures/esprima/declaration-function/migrated_0004/expected.json +++ b/test/fixtures/esprima/declaration-function/migrated_0004/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/esprima/declaration-function/migrated_0005/expected.json b/test/fixtures/esprima/declaration-function/migrated_0005/expected.json index f5013969f2..5924cefb02 100644 --- a/test/fixtures/esprima/declaration-function/migrated_0005/expected.json +++ b/test/fixtures/esprima/declaration-function/migrated_0005/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": "StringLiteral", + "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/esprima/declaration-function/migrated_0012/expected.json b/test/fixtures/esprima/declaration-function/migrated_0012/expected.json index 4841a07e51..fac0f4b32c 100644 --- a/test/fixtures/esprima/declaration-function/migrated_0012/expected.json +++ b/test/fixtures/esprima/declaration-function/migrated_0012/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/esprima/declaration-function/migrated_0014/expected.json b/test/fixtures/esprima/declaration-function/migrated_0014/expected.json index 13d9c39d33..b4d8d83676 100644 --- a/test/fixtures/esprima/declaration-function/migrated_0014/expected.json +++ b/test/fixtures/esprima/declaration-function/migrated_0014/expected.json @@ -118,9 +118,11 @@ "column": 30 } }, - "value": "use strict", - "rawValue": "use strict", - "raw": "\"use strict\"" + "extra": { + "rawValue": "use strict", + "raw": "\"use strict\"" + }, + "value": "use strict" }, "operator": "+", "right": { @@ -137,15 +139,19 @@ "column": 35 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/declaration-let/migrated_0002/expected.json b/test/fixtures/esprima/declaration-let/migrated_0002/expected.json index d6c387f1cf..8e0f3eda0b 100644 --- a/test/fixtures/esprima/declaration-let/migrated_0002/expected.json +++ b/test/fixtures/esprima/declaration-let/migrated_0002/expected.json @@ -102,16 +102,20 @@ "column": 12 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "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/expected.json b/test/fixtures/esprima/declaration-let/migrated_0003/expected.json index 4159969a48..a64ced02ce 100644 --- a/test/fixtures/esprima/declaration-let/migrated_0003/expected.json +++ b/test/fixtures/esprima/declaration-let/migrated_0003/expected.json @@ -102,9 +102,11 @@ "column": 12 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -151,9 +153,11 @@ "column": 19 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -200,16 +204,20 @@ "column": 29 } }, - "value": 1977, - "rawValue": 1977, - "raw": "1977" + "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/expected.json b/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json index c18fa769b5..c6d4b5de2b 100644 --- a/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json +++ b/test/fixtures/esprima/directive-prolog/migrated_0000/expected.json @@ -89,39 +89,6 @@ } }, "body": [ - { - "type": "ExpressionStatement", - "start": 15, - "end": 31, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 31 - } - }, - "expression": { - "type": "StringLiteral", - "start": 15, - "end": 30, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 30 - } - }, - "value": "use strict", - "rawValue": "use strict", - "raw": "'use\\x20strict'" - } - }, { "type": "WithStatement", "start": 32, @@ -168,13 +135,53 @@ } } } + ], + "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": [], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json b/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json index 32deb8d4e2..1acd32f8f8 100644 --- a/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json +++ b/test/fixtures/esprima/directive-prolog/migrated_0001/expected.json @@ -89,39 +89,6 @@ } }, "body": [ - { - "type": "ExpressionStatement", - "start": 15, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "expression": { - "type": "StringLiteral", - "start": 15, - "end": 28, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 28 - } - }, - "value": "use\nstrict", - "rawValue": "use\nstrict", - "raw": "'use\\nstrict'" - } - }, { "type": "WithStatement", "start": 30, @@ -168,13 +135,53 @@ } } } + ], + "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": [], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index a37dc71384..55e7cb964b 100644 --- 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 @@ -123,14 +123,17 @@ "column": 11 } }, - "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/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 index 3952075405..1162212f88 100644 --- 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 @@ -124,12 +124,15 @@ "column": 10 } }, - "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/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 index c80e27a7c8..c7416244d2 100644 --- 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 @@ -139,12 +139,15 @@ "column": 13 } }, - "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/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 index 11686156c6..bd5854bcd0 100644 --- 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 @@ -91,12 +91,15 @@ "column": 7 } }, - "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/esprima/es2015-array-binding-pattern/elision/expected.json b/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json index 3f3f6aa64d..6eba052f46 100644 --- a/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-array-binding-pattern/elision/expected.json @@ -94,12 +94,15 @@ "column": 9 } }, - "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/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-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-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/elision/expected.json b/test/fixtures/esprima/es2015-array-pattern/elision/expected.json index 13bbbbceac..f426e72528 100644 --- a/test/fixtures/esprima/es2015-array-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/elision/expected.json @@ -104,14 +104,17 @@ "column": 12 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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-var/expected.json b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json index 2c1b12478e..821296cbdb 100644 --- a/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/empty-pattern-var/expected.json @@ -87,14 +87,17 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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/expected.json b/test/fixtures/esprima/es2015-array-pattern/hole/expected.json index 8dfe71997b..e267a31f66 100644 --- a/test/fixtures/esprima/es2015-array-pattern/hole/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/hole/expected.json @@ -121,14 +121,17 @@ "column": 12 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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/expected.json b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json index d06abc7113..59b556c0f5 100644 --- a/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/nested-pattern/expected.json @@ -104,14 +104,17 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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/expected.json b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json index df31ae2fcd..16876bb02e 100644 --- a/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json @@ -56,7 +56,8 @@ "column": 6 } }, - "body": [] + "body": [], + "directives": [] }, "handler": { "type": "CatchClause", @@ -262,9 +263,11 @@ "column": 29 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "kind": "init" @@ -346,9 +349,11 @@ "column": 38 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "kind": "init" @@ -453,12 +458,14 @@ "column": 49 } }, - "body": [] + "body": [], + "directives": [] } }, "guardedHandlers": [], "finalizer": null } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-array-pattern/rest/expected.json b/test/fixtures/esprima/es2015-array-pattern/rest/expected.json index cb533f681d..18936fbfdf 100644 --- a/test/fixtures/esprima/es2015-array-pattern/rest/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/rest/expected.json @@ -119,14 +119,17 @@ "column": 14 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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/expected.json b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json index c2fa502238..ef275391a1 100644 --- a/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/tailing-hold/expected.json @@ -105,14 +105,17 @@ "column": 11 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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/expected.json b/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param/expected.json index 2726675278..acbfab9cf7 100644 --- 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 @@ -56,7 +56,8 @@ "column": 7 } }, - "body": [] + "body": [], + "directives": [] }, "handler": { "type": "CatchClause", @@ -131,9 +132,11 @@ "column": 21 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ] @@ -152,12 +155,14 @@ "column": 27 } }, - "body": [] + "body": [], + "directives": [] } }, "guardedHandlers": [], "finalizer": null } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 48546eeb6c..75d5b40cd2 100644 --- a/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/with-default-fn/expected.json @@ -120,9 +120,11 @@ "column": 15 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } ] @@ -142,9 +144,11 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 982603fb4d..2d14e8848e 100644 --- a/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json @@ -156,14 +156,17 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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-with-multiple-arg-and-rest/expected.json b/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-arg-and-rest/expected.json index 6e488ff2b1..64ca19741f 100644 --- 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 @@ -138,12 +138,15 @@ "column": 15 } }, - "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/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json b/test/fixtures/esprima/es2015-arrow-function/arrow-with-only-rest/expected.json index 79abe75001..fa50513676 100644 --- 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 @@ -106,12 +106,15 @@ "column": 11 } }, - "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/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 index 4ebe77e8fc..158f0af7b4 100644 --- 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 @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:7)" + "throws": "Unexpected token (1:6)" } diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json index ed4c1605fe..6b22652418 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0000/expected.json @@ -74,12 +74,15 @@ "column": 12 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "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/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json index c3e068731d..070478ffa3 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0001/expected.json @@ -91,12 +91,15 @@ "column": 11 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "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/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json index dc38971fa7..71885e218e 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0002/expected.json @@ -91,12 +91,15 @@ "column": 13 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "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/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json index 4bdd74c258..57366e881f 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0003/expected.json @@ -107,12 +107,15 @@ "column": 16 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "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/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json index ebd04a794b..a6acfabee4 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0004/expected.json @@ -120,15 +120,19 @@ "column": 9 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "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/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json index 7a3afe8bd4..fbd87bd0c4 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json @@ -139,17 +139,22 @@ "column": 20 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json index 287f532194..fe17cfad68 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0006/expected.json @@ -134,9 +134,11 @@ "column": 16 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, "label": { @@ -156,10 +158,12 @@ "name": "label" } } - ] + ], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json index 9a918edee0..59f0dbf100 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0007/expected.json @@ -136,15 +136,19 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "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/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json index 8b3e1161d1..1d3eb7338f 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0008/expected.json @@ -104,9 +104,11 @@ "column": 4 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -160,6 +162,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json index 3351297bbe..b4e861da61 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0009/expected.json @@ -91,12 +91,15 @@ "column": 10 } }, - "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/esprima/es2015-arrow-function/migrated_0010/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json index cdb3afb5bc..f3bbc75306 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0010/expected.json @@ -91,12 +91,15 @@ "column": 15 } }, - "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/esprima/es2015-arrow-function/migrated_0011/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json index c40f9bbb31..98652468ab 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0011/expected.json @@ -91,12 +91,15 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "00" + "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/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json index 95224d5129..d4be8b7577 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0012/expected.json @@ -107,12 +107,15 @@ "column": 15 } }, - "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/esprima/es2015-arrow-function/migrated_0013/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json index 645860e175..8a08def13e 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0013/expected.json @@ -104,9 +104,11 @@ "column": 10 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], @@ -124,12 +126,15 @@ "column": 17 } }, - "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/esprima/es2015-arrow-function/migrated_0014/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json index fd39c13ced..b782563eff 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0014/expected.json @@ -120,9 +120,11 @@ "column": 13 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], @@ -140,12 +142,15 @@ "column": 20 } }, - "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/esprima/es2015-arrow-function/migrated_0015/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json index e81c37fc89..b565e367ee 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0015/expected.json @@ -93,9 +93,12 @@ }, "name": "x" }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json index 8368737c3f..3fc7b625b7 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0016/expected.json @@ -126,13 +126,16 @@ "column": 12 } }, - "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/esprima/es2015-arrow-function/migrated_0017/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json index 8a2ef02d21..7d5558cdaf 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0017/expected.json @@ -192,12 +192,17 @@ "name": "z" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 607cd3e194..8e5a64d7e3 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0000/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0b0" + "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/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json index 23356e76be..869a4573f6 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0001/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 1, - "rawValue": 1, - "raw": "0b1" + "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/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json index be3c47afa8..946f9be4db 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0002/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 2, - "rawValue": 2, - "raw": "0b10" + "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/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json index ae57cab25c..50c71c2d94 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0003/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0B0" + "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/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json index 4937dfc854..94253b3ff7 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0004/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 1, - "rawValue": 1, - "raw": "0B1" + "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/expected.json b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json index e6cfe9f05a..5a539443cf 100644 --- a/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-binary-integer-literal/migrated_0005/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 2, - "rawValue": 2, - "raw": "0B10" + "extra": { + "rawValue": 2, + "raw": "0B10" + }, + "value": 2 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0001/expected.json b/test/fixtures/esprima/es2015-class/migrated_0001/expected.json index 0f5ada00b1..de6307983c 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0001/expected.json @@ -72,9 +72,11 @@ "column": 17 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "body": { "type": "ClassBody", @@ -93,6 +95,7 @@ "body": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0016/expected.json b/test/fixtures/esprima/es2015-class/migrated_0016/expected.json index 0048caa7d4..0ba4da86df 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0016/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0016/expected.json @@ -117,9 +117,11 @@ "column": 25 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "body": { "type": "ClassBody", @@ -142,6 +144,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0019/expected.json b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json index c7f6cadc22..d991009313 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0019/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json @@ -103,9 +103,11 @@ "column": 22 } }, - "value": "constructor", - "rawValue": "constructor", - "raw": "\"constructor\"" + "extra": { + "rawValue": "constructor", + "raw": "\"constructor\"" + }, + "value": "constructor" }, "static": false, "kind": "constructor", @@ -141,7 +143,8 @@ "column": 26 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -174,9 +177,11 @@ "column": 41 } }, - "value": "constructor", - "rawValue": "constructor", - "raw": "\"constructor\"" + "extra": { + "rawValue": "constructor", + "raw": "\"constructor\"" + }, + "value": "constructor" }, "static": false, "kind": "method", @@ -212,13 +217,15 @@ "column": 46 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0021/expected.json b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json index 90ed6197ca..21d43a0b9f 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0021/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json @@ -103,9 +103,11 @@ "column": 28 } }, - "value": "prototype", - "rawValue": "prototype", - "raw": "\"prototype\"" + "extra": { + "rawValue": "prototype", + "raw": "\"prototype\"" + }, + "value": "prototype" }, "static": true, "kind": "method", @@ -141,13 +143,15 @@ "column": 33 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0022/expected.json b/test/fixtures/esprima/es2015-class/migrated_0022/expected.json index 5a08887ae2..0df98d2cb5 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0022/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0022/expected.json @@ -74,9 +74,12 @@ }, "body": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0023/expected.json b/test/fixtures/esprima/es2015-class/migrated_0023/expected.json index daf97fa8cc..f639d9d497 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0023/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0023/expected.json @@ -89,9 +89,12 @@ }, "body": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0024/expected.json b/test/fixtures/esprima/es2015-class/migrated_0024/expected.json index 0805cc723d..e85fb517b8 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0024/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0024/expected.json @@ -71,9 +71,11 @@ "column": 16 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "body": { "type": "ClassBody", @@ -91,9 +93,12 @@ }, "body": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0025/expected.json b/test/fixtures/esprima/es2015-class/migrated_0025/expected.json index 6b475a1756..cf178864e7 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0025/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0025/expected.json @@ -86,9 +86,11 @@ "column": 18 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "body": { "type": "ClassBody", @@ -106,9 +108,12 @@ }, "body": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 8f7d2304f4..3799c4ee35 100644 --- a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0000/expected.json @@ -135,9 +135,11 @@ "column": 18 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -155,11 +157,13 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] } } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index beb32095e0..b922dc9f54 100644 --- a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0001/expected.json @@ -105,9 +105,11 @@ "column": 16 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -125,9 +127,11 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 133d3320bc..0fdbc8a52e 100644 --- a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json @@ -183,9 +183,11 @@ "column": 21 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -203,7 +205,8 @@ "column": 25 } }, - "body": [] + "body": [], + "directives": [] } }, "kind": "init" @@ -212,6 +215,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index dcc67edb83..6079a74348 100644 --- 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 @@ -152,12 +152,15 @@ "column": 13 } }, - "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/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json index 734b745fab..b4dad85bbf 100644 --- a/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/elision/expected.json @@ -90,12 +90,15 @@ "column": 6 } }, - "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/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 index efd854b233..95e743cb0f 100644 --- 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 @@ -130,9 +130,11 @@ "column": 7 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "computed": true } @@ -153,12 +155,15 @@ "column": 13 } }, - "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/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/nested-assignment/expected.json index 63881f8131..a3b62d0ec1 100644 --- 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 @@ -132,9 +132,11 @@ "column": 6 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, { @@ -240,9 +242,11 @@ "column": 16 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "computed": true } @@ -282,12 +286,15 @@ "column": 24 } }, - "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/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 index 72f41b4fa2..70b18e9e2e 100644 --- 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 @@ -185,14 +185,17 @@ "column": 8 } }, - "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/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json b/test/fixtures/esprima/es2015-destructuring-assignment-array-pattern/simple-assignment/expected.json index 17e17c57fe..5d3cc3bc51 100644 --- 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 @@ -104,12 +104,15 @@ "column": 7 } }, - "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/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 index 100e7a3484..0b11316d47 100644 --- 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 @@ -87,13 +87,18 @@ "column": 7 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index a140649c5e..e4d7cfd018 100644 --- 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 @@ -480,9 +480,11 @@ "column": 26 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "computed": true } @@ -544,12 +546,15 @@ "column": 50 } }, - "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/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 index 17e21344b3..4521c6e3bf 100644 --- 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 @@ -556,13 +556,18 @@ "column": 5 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 49034362d5..4449de5650 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-const-number/expected.json @@ -103,15 +103,18 @@ "column": 20 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "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-class/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json index 0d4410ae2e..c6453bfd9c 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-class/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "ClassExpression", + "type": "ClassDeclaration", "start": 15, "end": 23, "loc": { @@ -76,6 +76,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 79dccfed7b..e881a423f0 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-expression/expected.json @@ -70,9 +70,11 @@ "column": 17 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "operator": "+", "right": { @@ -89,13 +91,18 @@ "column": 21 } }, - "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/esprima/es2015-export-declaration/export-default-function/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json index be8795503e..364e85431c 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-function/expected.json @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "FunctionExpression", + "type": "FunctionDeclaration", "start": 15, "end": 29, "loc": { @@ -74,10 +74,12 @@ "column": 29 } }, - "body": [] + "body": [], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 440498ffc2..4758b655ec 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-number/expected.json @@ -56,11 +56,14 @@ "column": 17 } }, - "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/esprima/es2015-export-declaration/export-default-object/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json index 44f93db202..5d9a5f6369 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json @@ -104,15 +104,18 @@ "column": 23 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "kind": "init" } ] } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 5c1b86ad08..e3e870a7bf 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-batch/expected.json @@ -56,11 +56,14 @@ "column": 19 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json index d87b9e3ad0..0a6a723e7b 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-default/expected.json @@ -106,11 +106,14 @@ "column": 27 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-default/expected.json index db67cc7139..466e385f0b 100644 --- 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 @@ -106,11 +106,14 @@ "column": 34 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifier/expected.json index 2cf90b4252..7ae9c17b81 100644 --- 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 @@ -106,11 +106,14 @@ "column": 30 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-named-as-specifiers/expected.json index dace6e4467..65c0fa29ea 100644 --- 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 @@ -153,11 +153,14 @@ "column": 39 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json index a8b61d3f41..396665ef21 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifier/expected.json @@ -106,11 +106,14 @@ "column": 23 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json index 71f75f58fb..09fc23f85e 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-from-specifiers/expected.json @@ -153,11 +153,14 @@ "column": 28 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json index c6b1bd5169..d9b4d3f5a5 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-function-declaration/expected.json @@ -91,7 +91,8 @@ "column": 25 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -123,11 +124,10 @@ "column": 31 } }, - "value": false, - "rawValue": false, - "raw": "false" + "value": false } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 5801f4b21d..b4302c2d1b 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-let-number/expected.json @@ -103,15 +103,18 @@ "column": 18 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "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-var-number/expected.json b/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json index 9ebf178806..bca842d905 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-var-number/expected.json @@ -103,15 +103,18 @@ "column": 18 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], "kind": "var" } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index f038000230..b1904263e7 100644 --- 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 @@ -119,15 +119,19 @@ "column": 26 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "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/expected.json b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json index 3dc0ce6afb..586f8e1856 100644 --- a/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-declaration-with-yield/expected.json @@ -119,15 +119,19 @@ "column": 25 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index cc24e31b58..edd55ba2ea 100644 --- a/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-expression-rest-param/expected.json @@ -106,11 +106,15 @@ "column": 19 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 0f53a4fd9c..dcddd48350 100644 --- a/test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-params/expected.json @@ -123,11 +123,15 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 4b28752a8f..15d56c524b 100644 --- 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 @@ -171,11 +171,15 @@ } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 273c61ba5e..6bc100acb2 100644 --- a/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-expression-with-yield/expected.json @@ -118,17 +118,23 @@ "column": 22 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-generator/generator-expression/expected.json b/test/fixtures/esprima/es2015-generator/generator-expression/expected.json index ab58afaeee..9cb0b17ba1 100644 --- a/test/fixtures/esprima/es2015-generator/generator-expression/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-expression/expected.json @@ -74,11 +74,15 @@ "column": 15 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index d54bbc11a2..7c3e3bcb37 100644 --- a/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json @@ -172,14 +172,18 @@ "column": 19 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 4085e3da1c..8b5ee65941 100644 --- 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 @@ -167,20 +167,26 @@ "column": 20 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 1696922399..14d2a18a84 100644 --- 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 @@ -167,20 +167,26 @@ "column": 19 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } } - ] + ], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index a207539d69..110cc9c9cb 100644 --- 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 @@ -184,19 +184,25 @@ "column": 3 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } - ] + ], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index dd439657fc..c749a9dbaf 100644 --- a/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json @@ -156,14 +156,18 @@ "argument": null } } - ] + ], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-generator/generator-method/expected.json b/test/fixtures/esprima/es2015-generator/generator-method/expected.json index ce2bcad3ea..a5bb9c44cb 100644 --- a/test/fixtures/esprima/es2015-generator/generator-method/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-method/expected.json @@ -123,14 +123,18 @@ "column": 12 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-identifier/module_await/expected.json b/test/fixtures/esprima/es2015-identifier/module_await/expected.json index eff37004fc..73b2c92bcd 100644 --- a/test/fixtures/esprima/es2015-identifier/module_await/expected.json +++ b/test/fixtures/esprima/es2015-identifier/module_await/expected.json @@ -87,12 +87,15 @@ "column": 9 } }, - "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/esprima/es2015-identifier/valid_await/expected.json b/test/fixtures/esprima/es2015-identifier/valid_await/expected.json index 480b8d531d..26afe27079 100644 --- a/test/fixtures/esprima/es2015-identifier/valid_await/expected.json +++ b/test/fixtures/esprima/es2015-identifier/valid_await/expected.json @@ -107,9 +107,12 @@ } }, "name": "await", - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index fd674134a4..918d5dc76f 100644 --- 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 @@ -136,11 +136,14 @@ "column": 28 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default-and-namespace-specifiers/expected.json index c83ff40f18..1481257a6e 100644 --- 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 @@ -120,11 +120,14 @@ "column": 31 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json index 073f43503c..90e760b5d0 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-default-as/expected.json @@ -105,11 +105,14 @@ "column": 34 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json index 691a530e45..68eab4b614 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-default/expected.json @@ -89,11 +89,14 @@ "column": 21 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json index 45b87643fb..d1465085b3 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-jquery/expected.json @@ -89,11 +89,14 @@ "column": 22 } }, - "value": "jquery", - "rawValue": "jquery", - "raw": "\"jquery\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json index 652a62b72a..1d1c75f23e 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-module/expected.json @@ -57,11 +57,14 @@ "column": 12 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifier/expected.json index 4198564920..158d42da07 100644 --- 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 @@ -105,11 +105,14 @@ "column": 30 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-as-specifiers/expected.json index 197fd882b6..a3c950ab9c 100644 --- 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 @@ -152,11 +152,14 @@ "column": 35 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json index 45f291208c..92681f683c 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-empty/expected.json @@ -57,11 +57,14 @@ "column": 20 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json index 5c0b3036c9..d328366be5 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifier/expected.json @@ -105,11 +105,14 @@ "column": 23 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers-comma/expected.json index 1dd153305f..fa924672aa 100644 --- 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 @@ -152,11 +152,14 @@ "column": 29 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json index afcf5e6751..4cffe066fd 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-named-specifiers/expected.json @@ -152,11 +152,14 @@ "column": 28 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json index 7a3783c90d..cdb990cbdc 100644 --- a/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json +++ b/test/fixtures/esprima/es2015-import-declaration/import-namespace-specifier/expected.json @@ -89,11 +89,14 @@ "column": 26 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "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/expected.json b/test/fixtures/esprima/es2015-import-declaration/import-null-as-nil/expected.json index 166aaf0ed8..378e45b83b 100644 --- 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 @@ -105,11 +105,14 @@ "column": 33 } }, - "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/esprima/es2015-lexical-declaration/migrated_0000/expected.json b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json index e61945111a..2d90f27140 100644 --- a/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-lexical-declaration/migrated_0000/expected.json @@ -133,9 +133,11 @@ "column": 37 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], @@ -172,13 +174,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/esprima/es2015-method-definition/migrated_0002/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json index 29fd63476c..e964b38846 100644 --- a/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json @@ -119,9 +119,11 @@ "column": 14 } }, - "value": "method", - "rawValue": "method", - "raw": "'method'" + "extra": { + "rawValue": "method", + "raw": "'method'" + }, + "value": "method" }, "kind": "init", "value": { @@ -156,7 +158,8 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -164,6 +167,7 @@ } } } - ] + ], + "directives": [] } } \ 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 index 7b7329bb7e..5c966843f4 100644 --- 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 @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:30)" -} \ No newline at end of file + "throws": "Redefinition of __proto__ property (1:20)" +} 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 index cbc444ce90..e19950ad14 100644 --- 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 @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:32)" -} \ No newline at end of file + "throws": "Redefinition of __proto__ property (1:22)" +} 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 index 0c5f4deed6..a8b5ad2f5b 100644 --- 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 @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:24)" -} \ No newline at end of file + "throws": "Redefinition of __proto__ property (1:14)" +} 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 index 00b62a33f8..a8b5ad2f5b 100644 --- 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 @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:26)" -} \ No newline at end of file + "throws": "Redefinition of __proto__ property (1:14)" +} 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 index 0c5f4deed6..a8b5ad2f5b 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json +++ b/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:24)" -} \ No newline at end of file + "throws": "Redefinition of __proto__ property (1:14)" +} 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 index e61c4bc6c6..370894461a 100644 --- 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 @@ -173,7 +173,8 @@ "column": 37 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -260,14 +261,18 @@ "column": 57 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 10aa2e429a..987143a14c 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json @@ -173,14 +173,18 @@ "column": 37 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index fb0485d90d..63dc917941 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json @@ -173,14 +173,18 @@ "column": 33 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index b112cc6b98..70085edf6a 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json @@ -190,14 +190,18 @@ "column": 38 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 3a347ec1c3..48f265cc99 100644 --- 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 @@ -88,9 +88,11 @@ "column": 14 } }, - "value": "__proto__", - "rawValue": "__proto__", - "raw": "\"__proto__\"" + "extra": { + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": "__proto__" }, "value": { "type": "NullLiteral", @@ -175,7 +177,8 @@ "column": 39 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -262,14 +265,18 @@ "column": 59 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index ec071f8f38..c6bdefacea 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json @@ -88,9 +88,11 @@ "column": 14 } }, - "value": "__proto__", - "rawValue": "__proto__", - "raw": "\"__proto__\"" + "extra": { + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": "__proto__" }, "value": { "type": "NullLiteral", @@ -175,14 +177,18 @@ "column": 39 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index a37ebb0e39..f414d0c2e1 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json @@ -88,9 +88,11 @@ "column": 14 } }, - "value": "__proto__", - "rawValue": "__proto__", - "raw": "\"__proto__\"" + "extra": { + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": "__proto__" }, "value": { "type": "NullLiteral", @@ -175,14 +177,18 @@ "column": 35 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 5300afd3aa..501fa19f68 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json @@ -88,9 +88,11 @@ "column": 14 } }, - "value": "__proto__", - "rawValue": "__proto__", - "raw": "\"__proto__\"" + "extra": { + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": "__proto__" }, "value": { "type": "NullLiteral", @@ -192,14 +194,18 @@ "column": 40 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-object-pattern/elision/expected.json b/test/fixtures/esprima/es2015-object-pattern/elision/expected.json index 28f02d871c..6b892f7870 100644 --- a/test/fixtures/esprima/es2015-object-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/elision/expected.json @@ -139,14 +139,17 @@ "column": 12 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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-for-lex/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json index dd2b8aee4b..25c24eb32b 100644 --- a/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/empty-for-lex/expected.json @@ -106,9 +106,11 @@ "column": 16 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "body": { "type": "EmptyStatement", @@ -126,6 +128,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json index 194a2277c7..82ed2b843a 100644 --- a/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/empty-lexical/expected.json @@ -87,14 +87,17 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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/expected.json b/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json index cf2b1a4c73..c910a2d773 100644 --- a/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/empty-var/expected.json @@ -87,14 +87,17 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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/expected.json b/test/fixtures/esprima/es2015-object-pattern/nested/expected.json index bcf6c6414e..2b2774d691 100644 --- a/test/fixtures/esprima/es2015-object-pattern/nested/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/nested/expected.json @@ -139,14 +139,17 @@ "column": 14 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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/expected.json b/test/fixtures/esprima/es2015-object-pattern/properties/expected.json index e35d04f735..a7861a314f 100644 --- a/test/fixtures/esprima/es2015-object-pattern/properties/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/properties/expected.json @@ -201,9 +201,11 @@ "column": 10 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } }, @@ -335,9 +337,11 @@ "column": 20 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "kind": "init" @@ -426,14 +430,17 @@ "column": 31 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "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/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json index 1e3d179cd6..bcf619d9dd 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0000/expected.json @@ -56,11 +56,14 @@ "column": 2 } }, - "value": 0, - "rawValue": 0, - "raw": "00" + "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/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json index ccdde2fe5f..8a021344bb 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0001/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0o0" + "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/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json index b8fdcdd6b2..aa7e6a2f80 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0002/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": "StringLiteral", - "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, @@ -137,14 +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" + } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 58c5a75980..118b2f32c6 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0003/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 2, - "rawValue": 2, - "raw": "0o2" + "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/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json index fc506965ec..5636575a62 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0004/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 10, - "rawValue": 10, - "raw": "0o12" + "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/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json index 0e4a704196..7c2c994467 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0005/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0O0" + "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/expected.json b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json index ed92c39059..306190058c 100644 --- a/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/expected.json +++ b/test/fixtures/esprima/es2015-octal-integer-literal/migrated_0006/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": "StringLiteral", - "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, @@ -137,14 +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" + } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 7c3f550db9..0ec4f48337 100644 --- a/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json +++ b/test/fixtures/esprima/es2015-spread-element/call-spread-number/expected.json @@ -101,14 +101,17 @@ "column": 7 } }, - "value": 0.5, - "rawValue": 0.5, - "raw": ".5" + "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-number/expected.json b/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json index 0e3260dc1b..5022e9d8b6 100644 --- a/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json +++ b/test/fixtures/esprima/es2015-spread-element/new-spread-number/expected.json @@ -101,14 +101,17 @@ "column": 11 } }, - "value": 0.5, - "rawValue": 0.5, - "raw": ".5" + "extra": { + "rawValue": 0.5, + "raw": ".5" + }, + "value": 0.5 } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-super-property/super_computed/expected.json b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json index d70c83f48b..fc8eabf3ce 100644 --- a/test/fixtures/esprima/es2015-super-property/super_computed/expected.json +++ b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json @@ -212,20 +212,24 @@ "column": 22 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "computed": true } } - ] + ], + "directives": [] } } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json b/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json index 6257eab282..3afaacea6e 100644 --- a/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json +++ b/test/fixtures/esprima/es2015-template-literals/escape-sequences/expected.json @@ -87,14 +87,17 @@ "column": 45 } }, - "value": "`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`", - "rawValue": "`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`", - "raw": "'`\\\\n\\\\r\\\\b\\\\v\\\\t\\\\f\\\\\\n\\\\\\r\\n`'" + "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/line-terminators/expected.json b/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json index 8119243646..836d521625 100644 --- a/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json +++ b/test/fixtures/esprima/es2015-template-literals/line-terminators/expected.json @@ -87,14 +87,17 @@ "column": 23 } }, - "value": "`\n\r\n`", - "rawValue": "`\n\r\n`", - "raw": "'`\\n\\r\\n`'" + "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/expected.json b/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json index 84b416c9b8..1a1ed2bb2a 100644 --- a/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json +++ b/test/fixtures/esprima/es2015-template-literals/literal-escape-sequences/expected.json @@ -87,14 +87,17 @@ "column": 50 } }, - "value": "`\\u{000042}\\u0042\\x42\\u0\\A\\0`", - "rawValue": "`\\u{000042}\\u0042\\x42\\u0\\A\\0`", - "raw": "'`\\\\u{000042}\\\\u0042\\\\x42\\\\u0\\\\A\\\\0`'" + "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-unicode-code-point-escape-sequence/migrated_0000/expected.json b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0000/expected.json index 0ac274c801..c6f9f2ce0e 100644 --- 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 @@ -87,14 +87,17 @@ "column": 35 } }, - "value": "\"\\u{714E}\\u{8336}\"", - "rawValue": "\"\\u{714E}\\u{8336}\"", - "raw": "'\"\\\\u{714E}\\\\u{8336}\"'" + "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/expected.json b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0001/expected.json index 319843f197..5c97440415 100644 --- 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 @@ -87,14 +87,17 @@ "column": 45 } }, - "value": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"", - "rawValue": "\"\\u{20BB7}\\u{91CE}\\u{5BB6}\"", - "raw": "'\"\\\\u{20BB7}\\\\u{91CE}\\\\u{5BB6}\"'" + "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/expected.json b/test/fixtures/esprima/es2015-unicode-code-point-escape-sequence/migrated_0002/expected.json index e2ea996f44..05e4851182 100644 --- 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 @@ -87,14 +87,17 @@ "column": 33 } }, - "value": "\"\\u{00000000034}\"", - "rawValue": "\"\\u{00000000034}\"", - "raw": "'\"\\\\u{00000000034}\"'" + "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-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-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-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-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-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-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-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-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/yield-array-pattern/expected.json b/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json index 5a8f717350..7a4fbd86f6 100644 --- a/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-array-pattern/expected.json @@ -106,9 +106,12 @@ }, "name": "x" }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index c1d8db8a5f..9c2f1fefbe 100644 --- a/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-arrow-parameter-name/expected.json @@ -91,12 +91,15 @@ "column": 13 } }, - "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/esprima/es2015-yield/yield-function-expression-parameter/expected.json b/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json index be34ece5b3..72a06d9cce 100644 --- a/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-function-expression-parameter/expected.json @@ -91,11 +91,15 @@ "column": 19 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json b/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json index 03c3926cb0..a2138f73ef 100644 --- a/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-function-expression/expected.json @@ -89,11 +89,15 @@ "column": 19 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json b/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json index 9260f06278..dbe92db430 100644 --- a/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json @@ -123,14 +123,18 @@ "column": 14 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json index 950f430f09..1b530aaaf0 100644 --- a/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-lexical-declaration/expected.json @@ -87,14 +87,17 @@ "column": 14 } }, - "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/esprima/es2015-yield/yield-method/expected.json b/test/fixtures/esprima/es2015-yield/yield-method/expected.json index 7a4f9cbf39..7ef2282cd6 100644 --- a/test/fixtures/esprima/es2015-yield/yield-method/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-method/expected.json @@ -123,14 +123,18 @@ "column": 13 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index b3a07a17aa..c48e078e6b 100644 --- a/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/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": "StringLiteral", - "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": "VariableDeclaration", "start": 14, @@ -178,6 +145,43 @@ ], "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/expected.json b/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json index dc762096f1..2773f3f558 100644 --- a/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-strict-method/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": "StringLiteral", - "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, @@ -156,12 +123,52 @@ "column": 27 } }, - "body": [] + "body": [], + "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" + } } } ] diff --git a/test/fixtures/esprima/expression-additive/migrated_0002/expected.json b/test/fixtures/esprima/expression-additive/migrated_0002/expected.json index 8adc9b67d6..e1846ee7d4 100644 --- a/test/fixtures/esprima/expression-additive/migrated_0002/expected.json +++ b/test/fixtures/esprima/expression-additive/migrated_0002/expected.json @@ -70,9 +70,11 @@ "column": 12 } }, - "value": "use strict", - "rawValue": "use strict", - "raw": "\"use strict\"" + "extra": { + "rawValue": "use strict", + "raw": "\"use strict\"" + }, + "value": "use strict" }, "operator": "+", "right": { @@ -89,12 +91,15 @@ "column": 17 } }, - "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/esprima/expression-assignment/migrated_0000/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json index 886a4c91ba..c55cb13771 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0000/expected.json @@ -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/esprima/expression-assignment/migrated_0001/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json index 087953e749..ccef73317a 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0001/expected.json @@ -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/esprima/expression-assignment/migrated_0002/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json index c40cefe77a..90279da775 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0002/expected.json @@ -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/esprima/expression-assignment/migrated_0003/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json index 77c0b3f6fd..8c50cdf2f0 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0003/expected.json @@ -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/esprima/expression-assignment/migrated_0004/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json index 3ea5616140..6c210fd1b6 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0004/expected.json @@ -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/esprima/expression-assignment/migrated_0005/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json index 3bb965131c..2c333b70e1 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0005/expected.json @@ -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/esprima/expression-assignment/migrated_0006/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json index 623bec2d65..53c21fe4d6 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0006/expected.json @@ -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/esprima/expression-assignment/migrated_0007/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json index 169b55b357..abc4cb0406 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0007/expected.json @@ -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/esprima/expression-assignment/migrated_0008/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json index 395bbc5959..3c8c2893e8 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0008/expected.json @@ -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/esprima/expression-assignment/migrated_0009/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json index f2baaf2d7c..cfa8f98dfa 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0009/expected.json @@ -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/esprima/expression-assignment/migrated_0010/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json index 63767ff44b..ff6f9db71d 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0010/expected.json @@ -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/esprima/expression-assignment/migrated_0011/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json index 22bf53cf58..3719a7fafe 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0011/expected.json @@ -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/esprima/expression-assignment/migrated_0012/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json index 52cfe31685..84a3e7d56e 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0012/expected.json @@ -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/esprima/expression-assignment/migrated_0013/expected.json b/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json index 0cb0e23497..456765cc37 100644 --- a/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json +++ b/test/fixtures/esprima/expression-assignment/migrated_0013/expected.json @@ -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/esprima/expression-conditional/migrated_0000/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json index 9252297ac7..0ae6562f5f 100644 --- a/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json +++ b/test/fixtures/esprima/expression-conditional/migrated_0000/expected.json @@ -86,9 +86,11 @@ "column": 5 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "alternate": { "type": "NumberLiteral", @@ -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/esprima/expression-conditional/migrated_0001/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json index 6d0cf5e9ff..5f5e161e69 100644 --- a/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json +++ b/test/fixtures/esprima/expression-conditional/migrated_0001/expected.json @@ -118,9 +118,11 @@ "column": 10 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "alternate": { "type": "NumberLiteral", @@ -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/esprima/expression-conditional/migrated_0002/expected.json b/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json index 9d2c4afc3f..bee8292533 100644 --- a/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json +++ b/test/fixtures/esprima/expression-conditional/migrated_0002/expected.json @@ -101,10 +101,12 @@ "column": 6 } }, - "value": 0, - "rawValue": 0, - "raw": "0", - "parenthesizedExpression": true + "extra": { + "rawValue": 0, + "raw": "0", + "parenthesized": true + }, + "value": 0 }, "consequent": { "type": "NumberLiteral", @@ -120,9 +122,11 @@ "column": 11 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "alternate": { "type": "NumberLiteral", @@ -138,13 +142,16 @@ "column": 15 } }, - "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/esprima/expression-grouping/migrated_0000/expected.json b/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json index a926bd6ac4..030722007d 100644 --- a/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json +++ b/test/fixtures/esprima/expression-grouping/migrated_0000/expected.json @@ -84,10 +84,12 @@ "column": 2 } }, - "value": 1, - "rawValue": 1, - "raw": "1", - "parenthesizedExpression": true + "extra": { + "rawValue": 1, + "raw": "1", + "parenthesized": true + }, + "value": 1 }, "operator": "+", "right": { @@ -104,10 +106,12 @@ "column": 8 } }, - "value": 2, - "rawValue": 2, - "raw": "2", - "parenthesizedExpression": true + "extra": { + "rawValue": 2, + "raw": "2", + "parenthesized": true + }, + "value": 2 } }, "operator": "+", @@ -125,12 +129,15 @@ "column": 15 } }, - "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/esprima/expression-grouping/migrated_0001/expected.json b/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json index efa51994a8..dfcea13c9a 100644 --- a/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json +++ b/test/fixtures/esprima/expression-grouping/migrated_0001/expected.json @@ -84,9 +84,11 @@ "column": 1 } }, - "value": 4, - "rawValue": 4, - "raw": "4" + "extra": { + "rawValue": 4, + "raw": "4" + }, + "value": 4 }, "operator": "+", "right": { @@ -103,9 +105,11 @@ "column": 5 } }, - "value": 5, - "rawValue": 5, - "raw": "5" + "extra": { + "rawValue": 5, + "raw": "5" + }, + "value": 5 } }, "operator": "<<", @@ -123,13 +127,16 @@ "column": 11 } }, - "value": 6, - "rawValue": 6, - "raw": "6", - "parenthesizedExpression": true + "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_0007/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json index b353ef2c83..5e0c9c3c30 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0007/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0007/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/esprima/expression-left-hand-side/migrated_0009/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json index 6105d2841a..2a92530d73 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0009/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0009/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/esprima/expression-left-hand-side/migrated_0015/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json index f26ab8b935..ec68a20ef6 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0015/expected.json @@ -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/esprima/expression-left-hand-side/migrated_0016/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json index 624c7b81b9..a7a9ccf384 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0016/expected.json @@ -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/esprima/expression-left-hand-side/migrated_0017/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json index 23d090fedc..c94c04107e 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0017/expected.json @@ -129,9 +129,11 @@ "column": 11 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } ] }, @@ -168,9 +170,11 @@ "column": 24 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 }, { "type": "NumberLiteral", @@ -186,9 +190,11 @@ "column": 27 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 }, { "type": "NumberLiteral", @@ -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/esprima/expression-left-hand-side/migrated_0018/expected.json b/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json index 080068549b..b7649d92f8 100644 --- a/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json +++ b/test/fixtures/esprima/expression-left-hand-side/migrated_0018/expected.json @@ -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/harmony/uncategorised/57/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0087/expected.json similarity index 50% rename from test/fixtures/harmony/uncategorised/57/expected.json rename to test/fixtures/esprima/invalid-syntax/migrated_0087/expected.json index 8dd4aace6c..49f6398459 100644 --- a/test/fixtures/harmony/uncategorised/57/expected.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0087/expected.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 20, + "end": 31, "loc": { "start": { "line": 1, @@ -9,13 +9,13 @@ }, "end": { "line": 1, - "column": 20 + "column": 31 } }, "program": { "type": "Program", "start": 0, - "end": 20, + "end": 31, "loc": { "start": { "line": 1, @@ -23,15 +23,119 @@ }, "end": { "line": 1, - "column": 20 + "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": 20, + "end": 13, "loc": { "start": { "line": 1, @@ -39,13 +143,13 @@ }, "end": { "line": 1, - "column": 20 + "column": 13 } }, - "expression": { - "type": "ComprehensionExpression", + "value": { + "type": "DirectiveLiteral", "start": 0, - "end": 20, + "end": 12, "loc": { "start": { "line": 1, @@ -53,79 +157,13 @@ }, "end": { "line": 1, - "column": 20 + "column": 12 } }, - "blocks": [ - { - "type": "ComprehensionBlock", - "start": 1, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "left": { - "type": "Identifier", - "start": 6, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - }, - "name": "x" - }, - "right": { - "type": "Identifier", - "start": 11, - "end": 16, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 16 - } - }, - "name": "array" - } - } - ], - "filter": null, - "body": { - "type": "Identifier", - "start": 18, - "end": 19, - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 19 - } - }, - "name": "x" - }, - "generator": false + "raw": "\"use strict\"", + "value": "use strict" } } ] - }, - "comments": [] + } } \ No newline at end of file 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_0216/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json index e68fbb6aec..91bbdfe83f 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:2)" -} \ No newline at end of file + "throws": "Octal literal in strict mode (1: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_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_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_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_0221/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json index aca079ee39..ae2bfab55c 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:20)" -} \ No newline at end of file + "throws": "Octal literal in strict mode (1:35)" +} diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json index aca079ee39..ae2bfab55c 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:20)" -} \ No newline at end of file + "throws": "Octal literal in strict mode (1:35)" +} 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_0270/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0270/options.json index 8bb9a5f99b..8df109cb3c 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0270/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0270/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:17)" -} \ No newline at end of file + "throws": "Classes may not have static property named prototype (1:16)" +} diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json index 8bb9a5f99b..8df109cb3c 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0271/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:17)" -} \ No newline at end of file + "throws": "Classes may not have static property named prototype (1:16)" +} diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json index 2a73699bc2..8a55b8365f 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:18)" -} \ No newline at end of file + "throws": "The keyword 'static' is reserved (1:17)" +} diff --git a/test/fixtures/esprima/statement-break/migrated_0000/expected.json b/test/fixtures/esprima/statement-break/migrated_0000/expected.json index 15042df691..e27a473406 100644 --- a/test/fixtures/esprima/statement-break/migrated_0000/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0000/expected.json @@ -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/esprima/statement-break/migrated_0001/expected.json b/test/fixtures/esprima/statement-break/migrated_0001/expected.json index be48009734..930203bdfe 100644 --- a/test/fixtures/esprima/statement-break/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0001/expected.json @@ -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/esprima/statement-break/migrated_0002/expected.json b/test/fixtures/esprima/statement-break/migrated_0002/expected.json index 6c31c586d6..207d4cf4c5 100644 --- a/test/fixtures/esprima/statement-break/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0002/expected.json @@ -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/esprima/statement-break/migrated_0003/expected.json b/test/fixtures/esprima/statement-break/migrated_0003/expected.json index 650a39cbce..694def79b2 100644 --- a/test/fixtures/esprima/statement-break/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-break/migrated_0003/expected.json @@ -70,9 +70,7 @@ "column": 22 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "__proto__" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "__proto__" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/statement-continue/migrated_0000/expected.json b/test/fixtures/esprima/statement-continue/migrated_0000/expected.json index 40763456b0..16edee2512 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0000/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0000/expected.json @@ -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/esprima/statement-continue/migrated_0001/expected.json b/test/fixtures/esprima/statement-continue/migrated_0001/expected.json index bfea074cf1..d58d0ffa9a 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0001/expected.json @@ -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/esprima/statement-continue/migrated_0002/expected.json b/test/fixtures/esprima/statement-continue/migrated_0002/expected.json index f43031468c..3d3611769c 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0002/expected.json @@ -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/esprima/statement-continue/migrated_0003/expected.json b/test/fixtures/esprima/statement-continue/migrated_0003/expected.json index 3b684f46cb..e2eede95cf 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0003/expected.json @@ -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/esprima/statement-continue/migrated_0004/expected.json b/test/fixtures/esprima/statement-continue/migrated_0004/expected.json index 6c809ee4ec..076d4478b5 100644 --- a/test/fixtures/esprima/statement-continue/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-continue/migrated_0004/expected.json @@ -70,9 +70,7 @@ "column": 22 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "body": { "type": "BlockStatement", @@ -120,7 +118,8 @@ "name": "__proto__" } } - ] + ], + "directives": [] } }, "label": { @@ -140,6 +139,7 @@ "name": "__proto__" } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/statement-expression/migrated_0002/expected.json b/test/fixtures/esprima/statement-expression/migrated_0002/expected.json index 5456f44f4a..03f4a58cb3 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0002/expected.json @@ -87,14 +87,17 @@ "column": 22 } }, - "value": "\\u0061", - "rawValue": "\\u0061", - "raw": "'\\\\u0061'" + "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/expected.json b/test/fixtures/esprima/statement-expression/migrated_0003/expected.json index 93af56eb06..d292e2317d 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0003/expected.json @@ -87,14 +87,17 @@ "column": 23 } }, - "value": "a\\u0061", - "rawValue": "a\\u0061", - "raw": "'a\\\\u0061'" + "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/expected.json b/test/fixtures/esprima/statement-expression/migrated_0004/expected.json index ddf30e2b43..58b1ca21f8 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0004/expected.json @@ -87,14 +87,17 @@ "column": 23 } }, - "value": "\\u0061a", - "rawValue": "\\u0061a", - "raw": "'\\\\u0061a'" + "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/expected.json b/test/fixtures/esprima/statement-expression/migrated_0005/expected.json index eee513b5d0..b9ab7766f2 100644 --- a/test/fixtures/esprima/statement-expression/migrated_0005/expected.json +++ b/test/fixtures/esprima/statement-expression/migrated_0005/expected.json @@ -87,14 +87,17 @@ "column": 24 } }, - "value": "\\u0061a ", - "rawValue": "\\u0061a ", - "raw": "'\\\\u0061a '" + "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_0001/expected.json b/test/fixtures/esprima/statement-if/migrated_0001/expected.json index 97e2c0b335..640c5691c2 100644 --- a/test/fixtures/esprima/statement-if/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-if/migrated_0001/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/esprima/statement-if/migrated_0002/expected.json b/test/fixtures/esprima/statement-if/migrated_0002/expected.json index 086e802703..02fd006838 100644 --- a/test/fixtures/esprima/statement-if/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-if/migrated_0002/expected.json @@ -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/esprima/statement-if/migrated_0005/expected.json b/test/fixtures/esprima/statement-if/migrated_0005/expected.json index 07468bf95b..baa36356a5 100644 --- a/test/fixtures/esprima/statement-if/migrated_0005/expected.json +++ b/test/fixtures/esprima/statement-if/migrated_0005/expected.json @@ -56,9 +56,7 @@ "column": 8 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "consequent": { "type": "ExpressionStatement", @@ -123,6 +121,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/statement-if/migrated_0006/expected.json b/test/fixtures/esprima/statement-if/migrated_0006/expected.json index 828179ffc2..2f9b5c6964 100644 --- a/test/fixtures/esprima/statement-if/migrated_0006/expected.json +++ b/test/fixtures/esprima/statement-if/migrated_0006/expected.json @@ -56,9 +56,7 @@ "column": 8 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true }, "consequent": { "type": "ExpressionStatement", @@ -123,6 +121,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json index 298c6ed2b8..52f64a4d6b 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0000/expected.json @@ -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/esprima/statement-iteration/migrated_0001/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json index cf9db0e4fd..04998adb58 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0001/expected.json @@ -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/esprima/statement-iteration/migrated_0002/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json index 3bd687b08d..8e9ac0c09e 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0002/expected.json @@ -153,7 +153,8 @@ } } } - ] + ], + "directives": [] }, "test": { "type": "BinaryExpression", @@ -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/esprima/statement-iteration/migrated_0003/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json index 7666f67d1b..d9bf919d8c 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0003/expected.json @@ -71,7 +71,8 @@ "column": 8 } }, - "body": [] + "body": [], + "directives": [] }, "test": { "type": "BooleanLiteral", @@ -87,9 +88,7 @@ "column": 21 } }, - "value": false, - "rawValue": false, - "raw": "false" + "value": false } }, { @@ -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/esprima/statement-iteration/migrated_0004/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json index 033f8a99dd..746642c0a5 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0004/expected.json @@ -103,11 +103,10 @@ "column": 21 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json index ff791459e4..5019d62edd 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0005/expected.json @@ -103,11 +103,10 @@ "column": 12 } }, - "value": true, - "rawValue": true, - "raw": "true" + "value": true } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json index b68c4e6106..b154f386f7 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0006/expected.json @@ -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/esprima/statement-iteration/migrated_0007/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json index c7381370ab..0ca7f0f400 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0007/expected.json @@ -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/esprima/statement-iteration/migrated_0010/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json index f45ca7088d..3b790cdecf 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0010/expected.json @@ -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/esprima/statement-iteration/migrated_0011/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json index 6640f73295..e7c1db4ec7 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0011/expected.json @@ -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/esprima/statement-iteration/migrated_0012/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json index e10d00d731..c6da62d7c5 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0012/expected.json @@ -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/esprima/statement-iteration/migrated_0013/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json index 61391fdd9f..eacbe24384 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0013/expected.json @@ -101,9 +101,11 @@ "column": 13 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, { @@ -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/esprima/statement-iteration/migrated_0014/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json index fb76721dce..7f485aaf19 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0014/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -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/esprima/statement-iteration/migrated_0015/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json index f826f885de..0c6bf2a092 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0015/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -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/esprima/statement-iteration/migrated_0016/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json index 16f684a226..586cbf67f5 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0016/expected.json @@ -87,9 +87,11 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } }, "test": { @@ -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/esprima/statement-iteration/migrated_0019/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0019/actual.js deleted file mode 100644 index 406a3a3c22..0000000000 --- a/test/fixtures/esprima/statement-iteration/migrated_0019/actual.js +++ /dev/null @@ -1 +0,0 @@ -for (var x = 42 in list) process(x); diff --git a/test/fixtures/esprima/statement-iteration/migrated_0022/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0022/actual.js deleted file mode 100644 index e10579bece..0000000000 --- a/test/fixtures/esprima/statement-iteration/migrated_0022/actual.js +++ /dev/null @@ -1 +0,0 @@ -for (var a = b = c = (d in e) in z); diff --git a/test/fixtures/esprima/statement-iteration/migrated_0022/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0022/expected.json deleted file mode 100644 index f08be47cf5..0000000000 --- a/test/fixtures/esprima/statement-iteration/migrated_0022/expected.json +++ /dev/null @@ -1,241 +0,0 @@ -{ - "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": "ForInStatement", - "start": 0, - "end": 36, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 36 - } - }, - "left": { - "type": "VariableDeclaration", - "start": 5, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "declarations": [ - { - "type": "VariableDeclarator", - "start": 9, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "id": { - "type": "Identifier", - "start": 9, - "end": 10, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 10 - } - }, - "name": "a" - }, - "init": { - "type": "AssignmentExpression", - "start": 13, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "operator": "=", - "left": { - "type": "Identifier", - "start": 13, - "end": 14, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 14 - } - }, - "name": "b" - }, - "right": { - "type": "AssignmentExpression", - "start": 17, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "operator": "=", - "left": { - "type": "Identifier", - "start": 17, - "end": 18, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 18 - } - }, - "name": "c" - }, - "right": { - "type": "BinaryExpression", - "start": 22, - "end": 28, - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 28 - } - }, - "left": { - "type": "Identifier", - "start": 22, - "end": 23, - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - }, - "name": "d" - }, - "operator": "in", - "right": { - "type": "Identifier", - "start": 27, - "end": 28, - "loc": { - "start": { - "line": 1, - "column": 27 - }, - "end": { - "line": 1, - "column": 28 - } - }, - "name": "e" - }, - "parenthesizedExpression": true - } - } - } - } - ], - "kind": "var" - }, - "right": { - "type": "Identifier", - "start": 33, - "end": 34, - "loc": { - "start": { - "line": 1, - "column": 33 - }, - "end": { - "line": 1, - "column": 34 - } - }, - "name": "z" - }, - "body": { - "type": "EmptyStatement", - "start": 35, - "end": 36, - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - } - } - ] - } -} \ No newline at end of file diff --git a/test/fixtures/esprima/statement-iteration/migrated_0023/actual.js b/test/fixtures/esprima/statement-iteration/migrated_0023/actual.js deleted file mode 100644 index dbbe45041a..0000000000 --- a/test/fixtures/esprima/statement-iteration/migrated_0023/actual.js +++ /dev/null @@ -1 +0,0 @@ -for (var i = function() { return 10 in [] } in list) process(x); diff --git a/test/fixtures/esprima/statement-iteration/migrated_0023/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0023/expected.json deleted file mode 100644 index b0f5f0232d..0000000000 --- a/test/fixtures/esprima/statement-iteration/migrated_0023/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/esprima/statement-iteration/migrated_0025/expected.json b/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json index f06c613c23..1f99f8deed 100644 --- a/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json +++ b/test/fixtures/esprima/statement-iteration/migrated_0025/expected.json @@ -151,9 +151,11 @@ "column": 16 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "computed": true }, @@ -189,6 +191,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json b/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json index c4f9e0e386..5157602658 100644 --- a/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-labelled/migrated_0001/expected.json @@ -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/esprima/statement-return/migrated_0000/expected.json b/test/fixtures/esprima/statement-return/migrated_0000/expected.json index 3f86692dc7..3811851cf2 100644 --- a/test/fixtures/esprima/statement-return/migrated_0000/expected.json +++ b/test/fixtures/esprima/statement-return/migrated_0000/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/esprima/statement-return/migrated_0001/expected.json b/test/fixtures/esprima/statement-return/migrated_0001/expected.json index f66370e4d6..cfc30f8e34 100644 --- a/test/fixtures/esprima/statement-return/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-return/migrated_0001/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/esprima/statement-return/migrated_0002/expected.json b/test/fixtures/esprima/statement-return/migrated_0002/expected.json index 864565296e..7e253235fc 100644 --- a/test/fixtures/esprima/statement-return/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-return/migrated_0002/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/esprima/statement-return/migrated_0003/expected.json b/test/fixtures/esprima/statement-return/migrated_0003/expected.json index 9c0041eb71..d4f71c39ad 100644 --- a/test/fixtures/esprima/statement-return/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-return/migrated_0003/expected.json @@ -138,11 +138,15 @@ } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/statement-switch/migrated_0001/expected.json b/test/fixtures/esprima/statement-switch/migrated_0001/expected.json index 9758d61707..6251d143ae 100644 --- a/test/fixtures/esprima/statement-switch/migrated_0001/expected.json +++ b/test/fixtures/esprima/statement-switch/migrated_0001/expected.json @@ -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/esprima/statement-switch/migrated_0002/expected.json b/test/fixtures/esprima/statement-switch/migrated_0002/expected.json index 7400509d5f..96908f65a6 100644 --- a/test/fixtures/esprima/statement-switch/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-switch/migrated_0002/expected.json @@ -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/esprima/statement-throw/migrated_0002/expected.json b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json index dc9afaed76..0ddcce0c63 100644 --- a/test/fixtures/esprima/statement-throw/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json @@ -104,15 +104,18 @@ "column": 24 } }, - "value": "Error", - "rawValue": "Error", - "raw": "\"Error\"" + "extra": { + "rawValue": "Error", + "raw": "\"Error\"" + }, + "value": "Error" }, "kind": "init" } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/statement-variable/migrated_0002/expected.json b/test/fixtures/esprima/statement-variable/migrated_0002/expected.json index 746c634e18..1050401744 100644 --- a/test/fixtures/esprima/statement-variable/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-variable/migrated_0002/expected.json @@ -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/esprima/statement-variable/migrated_0003/expected.json b/test/fixtures/esprima/statement-variable/migrated_0003/expected.json index e88bd0e0af..a1ed3e4b37 100644 --- a/test/fixtures/esprima/statement-variable/migrated_0003/expected.json +++ b/test/fixtures/esprima/statement-variable/migrated_0003/expected.json @@ -87,9 +87,11 @@ "column": 13 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, { @@ -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/esprima/statement-variable/migrated_0004/expected.json b/test/fixtures/esprima/statement-variable/migrated_0004/expected.json index f0f1cc157c..db6e0fba4c 100644 --- a/test/fixtures/esprima/statement-variable/migrated_0004/expected.json +++ b/test/fixtures/esprima/statement-variable/migrated_0004/expected.json @@ -87,9 +87,11 @@ "column": 10 } }, - "value": 14, - "rawValue": 14, - "raw": "14" + "extra": { + "rawValue": 14, + "raw": "14" + }, + "value": 14 } }, { @@ -136,9 +138,11 @@ "column": 17 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } }, { @@ -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/experimental/async-functions/options.json b/test/fixtures/experimental/async-functions/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/async-functions/options.json +++ b/test/fixtures/experimental/async-functions/options.json @@ -1,5 +1,3 @@ { - "features": { - "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 1793ef0b6f..26dffdc586 100644 --- a/test/fixtures/experimental/async-functions/pattern/expected.json +++ b/test/fixtures/experimental/async-functions/pattern/expected.json @@ -170,9 +170,11 @@ "column": 38 } }, - "value": "../lang/task", - "rawValue": "../lang/task", - "raw": "'../lang/task'" + "extra": { + "rawValue": "../lang/task", + "raw": "'../lang/task'" + }, + "value": "../lang/task" } ] } @@ -180,6 +182,7 @@ ], "kind": "const" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/experimental/uncategorised/10/expected.json b/test/fixtures/experimental/uncategorised/10/expected.json index 306cf66aef..a9e67765ef 100644 --- a/test/fixtures/experimental/uncategorised/10/expected.json +++ b/test/fixtures/experimental/uncategorised/10/expected.json @@ -124,7 +124,7 @@ } }, { - "type": "SpreadProperty", + "type": "RestProperty", "start": 8, "end": 12, "loc": { @@ -176,6 +176,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 7fd805ebbe..4de042a697 100644 --- a/test/fixtures/experimental/uncategorised/10/options.json +++ b/test/fixtures/experimental/uncategorised/10/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/test/fixtures/experimental/uncategorised/11/expected.json b/test/fixtures/experimental/uncategorised/11/expected.json index 4507ca2447..5da577c081 100644 --- a/test/fixtures/experimental/uncategorised/11/expected.json +++ b/test/fixtures/experimental/uncategorised/11/expected.json @@ -127,7 +127,7 @@ } }, { - "type": "SpreadProperty", + "type": "RestProperty", "start": 14, "end": 18, "loc": { @@ -174,11 +174,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 7fd805ebbe..4de042a697 100644 --- a/test/fixtures/experimental/uncategorised/11/options.json +++ b/test/fixtures/experimental/uncategorised/11/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/test/fixtures/experimental/uncategorised/12/options.json b/test/fixtures/experimental/uncategorised/12/options.json index 7fd805ebbe..4de042a697 100644 --- a/test/fixtures/experimental/uncategorised/12/options.json +++ b/test/fixtures/experimental/uncategorised/12/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/test/fixtures/experimental/uncategorised/13/options.json b/test/fixtures/experimental/uncategorised/13/options.json index 7fd805ebbe..4de042a697 100644 --- a/test/fixtures/experimental/uncategorised/13/options.json +++ b/test/fixtures/experimental/uncategorised/13/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/test/fixtures/experimental/uncategorised/14/expected.json b/test/fixtures/experimental/uncategorised/14/expected.json index 1002fb1e60..de5cd3bace 100644 --- a/test/fixtures/experimental/uncategorised/14/expected.json +++ b/test/fixtures/experimental/uncategorised/14/expected.json @@ -273,9 +273,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 7fd805ebbe..4de042a697 100644 --- a/test/fixtures/experimental/uncategorised/14/options.json +++ b/test/fixtures/experimental/uncategorised/14/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "plugins": ["objectRestSpread"] } diff --git a/test/fixtures/experimental/uncategorised/15/options.json b/test/fixtures/experimental/uncategorised/15/options.json index 2ba4efc5eb..080411a1bd 100644 --- a/test/fixtures/experimental/uncategorised/15/options.json +++ b/test/fixtures/experimental/uncategorised/15/options.json @@ -1,6 +1,4 @@ { - "features": { - "asyncFunctions": true - }, + "plugins": ["asyncFunctions"], "throws": "Unexpected token (1:30)" } diff --git a/test/fixtures/experimental/uncategorised/16/options.json b/test/fixtures/experimental/uncategorised/16/options.json index 60befbb037..ebda253376 100644 --- a/test/fixtures/experimental/uncategorised/16/options.json +++ b/test/fixtures/experimental/uncategorised/16/options.json @@ -1,6 +1,4 @@ { - "features": { - "asyncFunctions": true - }, + "plugins": ["asyncFunctions"], "throws": "Unexpected token (2:4)" } 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 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/17/options.json +++ b/test/fixtures/experimental/uncategorised/17/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/18/options.json b/test/fixtures/experimental/uncategorised/18/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/18/options.json +++ b/test/fixtures/experimental/uncategorised/18/options.json @@ -1,5 +1,3 @@ { - "features": { - "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 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/19/options.json +++ b/test/fixtures/experimental/uncategorised/19/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/20/options.json b/test/fixtures/experimental/uncategorised/20/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/20/options.json +++ b/test/fixtures/experimental/uncategorised/20/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/21/expected.json b/test/fixtures/experimental/uncategorised/21/expected.json index 99ba85f172..d6700e7b80 100644 --- a/test/fixtures/experimental/uncategorised/21/expected.json +++ b/test/fixtures/experimental/uncategorised/21/expected.json @@ -135,9 +135,11 @@ "column": 14 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "kind": "init" }, @@ -273,7 +275,8 @@ } } } - ] + ], + "directives": [] } } } @@ -283,6 +286,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 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/21/options.json +++ b/test/fixtures/experimental/uncategorised/21/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/22/options.json b/test/fixtures/experimental/uncategorised/22/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/22/options.json +++ b/test/fixtures/experimental/uncategorised/22/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/23/options.json b/test/fixtures/experimental/uncategorised/23/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/23/options.json +++ b/test/fixtures/experimental/uncategorised/23/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/24/options.json b/test/fixtures/experimental/uncategorised/24/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/24/options.json +++ b/test/fixtures/experimental/uncategorised/24/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/25/options.json b/test/fixtures/experimental/uncategorised/25/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/25/options.json +++ b/test/fixtures/experimental/uncategorised/25/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/26/expected.json b/test/fixtures/experimental/uncategorised/26/expected.json index 8ee2fcb4e1..c39596f9e3 100644 --- a/test/fixtures/experimental/uncategorised/26/expected.json +++ b/test/fixtures/experimental/uncategorised/26/expected.json @@ -134,9 +134,11 @@ "column": 12 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, { "type": "NumberLiteral", @@ -152,9 +154,11 @@ "column": 15 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 } ] }, @@ -177,6 +181,7 @@ ] } } - ] + ], + "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 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/26/options.json +++ b/test/fixtures/experimental/uncategorised/26/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/27/options.json b/test/fixtures/experimental/uncategorised/27/options.json index 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/27/options.json +++ b/test/fixtures/experimental/uncategorised/27/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/28/expected.json b/test/fixtures/experimental/uncategorised/28/expected.json index 882187725b..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", @@ -185,17 +184,23 @@ "column": 35 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/28/options.json +++ b/test/fixtures/experimental/uncategorised/28/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/29/expected.json b/test/fixtures/experimental/uncategorised/29/expected.json index 8b5de05d88..169869cbf6 100644 --- a/test/fixtures/experimental/uncategorised/29/expected.json +++ b/test/fixtures/experimental/uncategorised/29/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "body": { "type": "BlockStatement", @@ -140,13 +139,15 @@ "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 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/29/options.json +++ b/test/fixtures/experimental/uncategorised/29/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/3/expected.json b/test/fixtures/experimental/uncategorised/3/expected.json index b292c27d73..d6362bdbed 100644 --- a/test/fixtures/experimental/uncategorised/3/expected.json +++ b/test/fixtures/experimental/uncategorised/3/expected.json @@ -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 41c7f66605..d01676b6ba 100644 --- a/test/fixtures/experimental/uncategorised/3/options.json +++ b/test/fixtures/experimental/uncategorised/3/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/test/fixtures/experimental/uncategorised/30/expected.json b/test/fixtures/experimental/uncategorised/30/expected.json index 3f7882d5fb..60fc936189 100644 --- a/test/fixtures/experimental/uncategorised/30/expected.json +++ b/test/fixtures/experimental/uncategorised/30/expected.json @@ -134,9 +134,11 @@ "column": 25 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" }, "kind": "init" } @@ -146,6 +148,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 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/30/options.json +++ b/test/fixtures/experimental/uncategorised/30/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/31/expected.json b/test/fixtures/experimental/uncategorised/31/expected.json index a05229ee4e..55dbd1960c 100644 --- a/test/fixtures/experimental/uncategorised/31/expected.json +++ b/test/fixtures/experimental/uncategorised/31/expected.json @@ -154,7 +154,8 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -164,6 +165,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 01e1b60e6b..7bbe8c30f5 100644 --- a/test/fixtures/experimental/uncategorised/31/options.json +++ b/test/fixtures/experimental/uncategorised/31/options.json @@ -1,5 +1,3 @@ { - "features": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/32/options.json b/test/fixtures/experimental/uncategorised/32/options.json index 8958d766f8..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": { - "asyncFunctions": true - } + "plugins": ["asyncFunctions"] } diff --git a/test/fixtures/experimental/uncategorised/33/options.json b/test/fixtures/experimental/uncategorised/33/options.json index 2a3b127804..d760b0afda 100644 --- a/test/fixtures/experimental/uncategorised/33/options.json +++ b/test/fixtures/experimental/uncategorised/33/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/test/fixtures/experimental/uncategorised/34/options.json b/test/fixtures/experimental/uncategorised/34/options.json index 2a3b127804..d760b0afda 100644 --- a/test/fixtures/experimental/uncategorised/34/options.json +++ b/test/fixtures/experimental/uncategorised/34/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/test/fixtures/experimental/uncategorised/35/options.json b/test/fixtures/experimental/uncategorised/35/options.json index 2a3b127804..d760b0afda 100644 --- a/test/fixtures/experimental/uncategorised/35/options.json +++ b/test/fixtures/experimental/uncategorised/35/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/test/fixtures/experimental/uncategorised/36/options.json b/test/fixtures/experimental/uncategorised/36/options.json index 2a3b127804..d760b0afda 100644 --- a/test/fixtures/experimental/uncategorised/36/options.json +++ b/test/fixtures/experimental/uncategorised/36/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/test/fixtures/experimental/uncategorised/37/options.json b/test/fixtures/experimental/uncategorised/37/options.json index 2a3b127804..d760b0afda 100644 --- a/test/fixtures/experimental/uncategorised/37/options.json +++ b/test/fixtures/experimental/uncategorised/37/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/test/fixtures/experimental/uncategorised/38/options.json b/test/fixtures/experimental/uncategorised/38/options.json index 2a3b127804..d760b0afda 100644 --- a/test/fixtures/experimental/uncategorised/38/options.json +++ b/test/fixtures/experimental/uncategorised/38/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/test/fixtures/experimental/uncategorised/39/expected.json b/test/fixtures/experimental/uncategorised/39/expected.json index 10b9a29f22..da6ab2aeb4 100644 --- a/test/fixtures/experimental/uncategorised/39/expected.json +++ b/test/fixtures/experimental/uncategorised/39/expected.json @@ -183,9 +183,11 @@ "column": 22 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" }, "kind": "init" } @@ -260,6 +262,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 2a3b127804..d760b0afda 100644 --- a/test/fixtures/experimental/uncategorised/39/options.json +++ b/test/fixtures/experimental/uncategorised/39/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/test/fixtures/experimental/uncategorised/4/expected.json b/test/fixtures/experimental/uncategorised/4/expected.json index 3487223172..43b7675cb2 100644 --- a/test/fixtures/experimental/uncategorised/4/expected.json +++ b/test/fixtures/experimental/uncategorised/4/expected.json @@ -101,9 +101,11 @@ "column": 15 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "operator": "**", "right": { @@ -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 41c7f66605..d01676b6ba 100644 --- a/test/fixtures/experimental/uncategorised/4/options.json +++ b/test/fixtures/experimental/uncategorised/4/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/test/fixtures/experimental/uncategorised/40/options.json b/test/fixtures/experimental/uncategorised/40/options.json index 2a3b127804..d760b0afda 100644 --- a/test/fixtures/experimental/uncategorised/40/options.json +++ b/test/fixtures/experimental/uncategorised/40/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/test/fixtures/experimental/uncategorised/41/options.json b/test/fixtures/experimental/uncategorised/41/options.json index b433f712de..935ac72894 100644 --- a/test/fixtures/experimental/uncategorised/41/options.json +++ b/test/fixtures/experimental/uncategorised/41/options.json @@ -1,6 +1,4 @@ { - "features": { - "decorators": true - }, + "plugins": ["decorators"], "throws": "Leading decorators must be attached to a class declaration (1:5)" } diff --git a/test/fixtures/experimental/uncategorised/42/options.json b/test/fixtures/experimental/uncategorised/42/options.json index 821f4be393..ec1974dcf0 100644 --- a/test/fixtures/experimental/uncategorised/42/options.json +++ b/test/fixtures/experimental/uncategorised/42/options.json @@ -1,6 +1,4 @@ { - "features": { - "decorators": true - }, + "plugins": ["decorators"], "throws": "You have trailing decorators with no method (1:18)" } diff --git a/test/fixtures/experimental/uncategorised/43/expected.json b/test/fixtures/experimental/uncategorised/43/expected.json index fdf472db55..f1956ad133 100644 --- a/test/fixtures/experimental/uncategorised/43/expected.json +++ b/test/fixtures/experimental/uncategorised/43/expected.json @@ -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 bbe898f093..9c27576d4a 100644 --- a/test/fixtures/experimental/uncategorised/43/options.json +++ b/test/fixtures/experimental/uncategorised/43/options.json @@ -1,5 +1,3 @@ { - "features": { - "classProperties": true - } + "plugins": ["classProperties"] } diff --git a/test/fixtures/experimental/uncategorised/44/options.json b/test/fixtures/experimental/uncategorised/44/options.json index bbe898f093..9c27576d4a 100644 --- a/test/fixtures/experimental/uncategorised/44/options.json +++ b/test/fixtures/experimental/uncategorised/44/options.json @@ -1,5 +1,3 @@ { - "features": { - "classProperties": true - } + "plugins": ["classProperties"] } diff --git a/test/fixtures/experimental/uncategorised/45/options.json b/test/fixtures/experimental/uncategorised/45/options.json index bbe898f093..9c27576d4a 100644 --- a/test/fixtures/experimental/uncategorised/45/options.json +++ b/test/fixtures/experimental/uncategorised/45/options.json @@ -1,5 +1,3 @@ { - "features": { - "classProperties": true - } + "plugins": ["classProperties"] } diff --git a/test/fixtures/experimental/uncategorised/46/expected.json b/test/fixtures/experimental/uncategorised/46/expected.json index 9035cd541b..ade2f517c1 100644 --- a/test/fixtures/experimental/uncategorised/46/expected.json +++ b/test/fixtures/experimental/uncategorised/46/expected.json @@ -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 bbe898f093..9c27576d4a 100644 --- a/test/fixtures/experimental/uncategorised/46/options.json +++ b/test/fixtures/experimental/uncategorised/46/options.json @@ -1,5 +1,3 @@ { - "features": { - "classProperties": true - } + "plugins": ["classProperties"] } diff --git a/test/fixtures/experimental/uncategorised/47/expected.json b/test/fixtures/experimental/uncategorised/47/expected.json index 529bbb3a16..e13785eb68 100644 --- a/test/fixtures/experimental/uncategorised/47/expected.json +++ b/test/fixtures/experimental/uncategorised/47/expected.json @@ -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 860a7f5c18..4d015e4fbf 100644 --- a/test/fixtures/experimental/uncategorised/47/options.json +++ b/test/fixtures/experimental/uncategorised/47/options.json @@ -1,6 +1,6 @@ { - "features": { - "classProperties": true, - "decorators": true - } + "plugins": [ + "classProperties", + "decorators" + ] } diff --git a/test/fixtures/experimental/uncategorised/48/expected.json b/test/fixtures/experimental/uncategorised/48/expected.json index 0a295b8d9b..9f756cd6cb 100644 --- a/test/fixtures/experimental/uncategorised/48/expected.json +++ b/test/fixtures/experimental/uncategorised/48/expected.json @@ -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 860a7f5c18..4d015e4fbf 100644 --- a/test/fixtures/experimental/uncategorised/48/options.json +++ b/test/fixtures/experimental/uncategorised/48/options.json @@ -1,6 +1,6 @@ { - "features": { - "classProperties": true, - "decorators": true - } + "plugins": [ + "classProperties", + "decorators" + ] } diff --git a/test/fixtures/experimental/uncategorised/49/expected.json b/test/fixtures/experimental/uncategorised/49/expected.json index 1017436d55..0ca312dba2 100644 --- a/test/fixtures/experimental/uncategorised/49/expected.json +++ b/test/fixtures/experimental/uncategorised/49/expected.json @@ -168,9 +168,11 @@ "column": 27 } }, - "value": "wow", - "rawValue": "wow", - "raw": "'wow'" + "extra": { + "rawValue": "wow", + "raw": "'wow'" + }, + "value": "wow" }, "kind": "init" } @@ -180,6 +182,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 2a3b127804..d760b0afda 100644 --- a/test/fixtures/experimental/uncategorised/49/options.json +++ b/test/fixtures/experimental/uncategorised/49/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/test/fixtures/experimental/uncategorised/5/expected.json b/test/fixtures/experimental/uncategorised/5/expected.json index 8a1368ec93..a90eceb9de 100644 --- a/test/fixtures/experimental/uncategorised/5/expected.json +++ b/test/fixtures/experimental/uncategorised/5/expected.json @@ -70,9 +70,11 @@ "column": 1 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "operator": "**", "right": { @@ -103,9 +105,11 @@ "column": 7 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 }, "operator": "**", "right": { @@ -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 41c7f66605..d01676b6ba 100644 --- a/test/fixtures/experimental/uncategorised/5/options.json +++ b/test/fixtures/experimental/uncategorised/5/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/test/fixtures/experimental/uncategorised/50/expected.json b/test/fixtures/experimental/uncategorised/50/expected.json index 982de0b582..c901163da6 100644 --- a/test/fixtures/experimental/uncategorised/50/expected.json +++ b/test/fixtures/experimental/uncategorised/50/expected.json @@ -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 0f9c04fc1c..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": { - "exportExtensions": true - } + "plugins": ["exportExtensions"] } diff --git a/test/fixtures/experimental/uncategorised/51/expected.json b/test/fixtures/experimental/uncategorised/51/expected.json index 6c2099d8f6..cf777d23e3 100644 --- a/test/fixtures/experimental/uncategorised/51/expected.json +++ b/test/fixtures/experimental/uncategorised/51/expected.json @@ -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 0f9c04fc1c..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": { - "exportExtensions": true - } + "plugins": ["exportExtensions"] } diff --git a/test/fixtures/experimental/uncategorised/52/expected.json b/test/fixtures/experimental/uncategorised/52/expected.json index c0646aafb4..56f6998476 100644 --- a/test/fixtures/experimental/uncategorised/52/expected.json +++ b/test/fixtures/experimental/uncategorised/52/expected.json @@ -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 0f9c04fc1c..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": { - "exportExtensions": true - } + "plugins": ["exportExtensions"] } diff --git a/test/fixtures/experimental/uncategorised/53/expected.json b/test/fixtures/experimental/uncategorised/53/expected.json index 1b94aadbe9..8e1fc31aea 100644 --- a/test/fixtures/experimental/uncategorised/53/expected.json +++ b/test/fixtures/experimental/uncategorised/53/expected.json @@ -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 0f9c04fc1c..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": { - "exportExtensions": true - } + "plugins": ["exportExtensions"] } diff --git a/test/fixtures/experimental/uncategorised/54/expected.json b/test/fixtures/experimental/uncategorised/54/expected.json index e7128ee647..90607f31ac 100644 --- a/test/fixtures/experimental/uncategorised/54/expected.json +++ b/test/fixtures/experimental/uncategorised/54/expected.json @@ -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 0f9c04fc1c..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": { - "exportExtensions": true - } + "plugins": ["exportExtensions"] } diff --git a/test/fixtures/experimental/uncategorised/55/expected.json b/test/fixtures/experimental/uncategorised/55/expected.json index 4935b2fec0..1616be3690 100644 --- a/test/fixtures/experimental/uncategorised/55/expected.json +++ b/test/fixtures/experimental/uncategorised/55/expected.json @@ -103,9 +103,11 @@ "column": 10 } }, - "value": "=", - "rawValue": "=", - "raw": "'='" + "extra": { + "rawValue": "=", + "raw": "'='" + }, + "value": "=" }, { "type": "NumberLiteral", @@ -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 5e058ad445..f0d10aef27 100644 --- a/test/fixtures/experimental/uncategorised/55/options.json +++ b/test/fixtures/experimental/uncategorised/55/options.json @@ -1,5 +1,3 @@ { - "features": { - "trailingFunctionCommas": true - } + "plugins": ["trailingFunctionCommas"] } diff --git a/test/fixtures/experimental/uncategorised/56/options.json b/test/fixtures/experimental/uncategorised/56/options.json index 5e058ad445..f0d10aef27 100644 --- a/test/fixtures/experimental/uncategorised/56/options.json +++ b/test/fixtures/experimental/uncategorised/56/options.json @@ -1,5 +1,3 @@ { - "features": { - "trailingFunctionCommas": true - } + "plugins": ["trailingFunctionCommas"] } diff --git a/test/fixtures/experimental/uncategorised/57/options.json b/test/fixtures/experimental/uncategorised/57/options.json index 5e058ad445..f0d10aef27 100644 --- a/test/fixtures/experimental/uncategorised/57/options.json +++ b/test/fixtures/experimental/uncategorised/57/options.json @@ -1,5 +1,3 @@ { - "features": { - "trailingFunctionCommas": true - } + "plugins": ["trailingFunctionCommas"] } diff --git a/test/fixtures/experimental/uncategorised/58/expected.json b/test/fixtures/experimental/uncategorised/58/expected.json index 9cf1dfe1ed..e6a73fb255 100644 --- a/test/fixtures/experimental/uncategorised/58/expected.json +++ b/test/fixtures/experimental/uncategorised/58/expected.json @@ -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 5e058ad445..f0d10aef27 100644 --- a/test/fixtures/experimental/uncategorised/58/options.json +++ b/test/fixtures/experimental/uncategorised/58/options.json @@ -1,5 +1,3 @@ { - "features": { - "trailingFunctionCommas": true - } + "plugins": ["trailingFunctionCommas"] } diff --git a/test/fixtures/experimental/uncategorised/59/options.json b/test/fixtures/experimental/uncategorised/59/options.json index 62be2d0a68..3c571eea7a 100644 --- a/test/fixtures/experimental/uncategorised/59/options.json +++ b/test/fixtures/experimental/uncategorised/59/options.json @@ -1,6 +1,4 @@ { - "features": { - "trailingFunctionCommas": true - }, + "plugins": ["trailingFunctionCommas"], "throws": "Unexpected token (1:4)" } diff --git a/test/fixtures/experimental/uncategorised/6/expected.json b/test/fixtures/experimental/uncategorised/6/expected.json index c0f4e3fb97..755abf8daa 100644 --- a/test/fixtures/experimental/uncategorised/6/expected.json +++ b/test/fixtures/experimental/uncategorised/6/expected.json @@ -70,9 +70,11 @@ "column": 1 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "operator": "**", "right": { @@ -103,9 +105,11 @@ "column": 6 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 }, "operator": "**", "right": { @@ -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 41c7f66605..d01676b6ba 100644 --- a/test/fixtures/experimental/uncategorised/6/options.json +++ b/test/fixtures/experimental/uncategorised/6/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/test/fixtures/experimental/uncategorised/60/options.json b/test/fixtures/experimental/uncategorised/60/options.json index 01d373f173..8615cfcc03 100644 --- a/test/fixtures/experimental/uncategorised/60/options.json +++ b/test/fixtures/experimental/uncategorised/60/options.json @@ -1,6 +1,4 @@ { - "features": { - "trailingFunctionCommas": true - }, + "plugins": ["trailingFunctionCommas"], "throws": "Unexpected token (1:13)" } diff --git a/test/fixtures/experimental/uncategorised/61/options.json b/test/fixtures/experimental/uncategorised/61/options.json index 26872c0003..7c23acbd30 100644 --- a/test/fixtures/experimental/uncategorised/61/options.json +++ b/test/fixtures/experimental/uncategorised/61/options.json @@ -1,6 +1,4 @@ { - "features": { - "trailingFunctionCommas": true - }, + "plugins": ["trailingFunctionCommas"], "throws": "Unexpected token (1:7)" } diff --git a/test/fixtures/experimental/uncategorised/62/options.json b/test/fixtures/experimental/uncategorised/62/options.json index 2a3b127804..d760b0afda 100644 --- a/test/fixtures/experimental/uncategorised/62/options.json +++ b/test/fixtures/experimental/uncategorised/62/options.json @@ -1,5 +1,3 @@ { - "features": { - "decorators": true - } + "plugins": ["decorators"] } diff --git a/test/fixtures/experimental/uncategorised/7/expected.json b/test/fixtures/experimental/uncategorised/7/expected.json index a2a7cb100c..b07c383c1c 100644 --- a/test/fixtures/experimental/uncategorised/7/expected.json +++ b/test/fixtures/experimental/uncategorised/7/expected.json @@ -84,9 +84,11 @@ "column": 2 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "operator": "**", "right": { @@ -119,12 +121,16 @@ "column": 8 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "operator": "*", "right": { @@ -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 41c7f66605..d01676b6ba 100644 --- a/test/fixtures/experimental/uncategorised/7/options.json +++ b/test/fixtures/experimental/uncategorised/7/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "plugins": ["exponentiationOperator"] } diff --git a/test/fixtures/experimental/uncategorised/8/expected.json b/test/fixtures/experimental/uncategorised/8/expected.json index adb1668c02..71d29e12cf 100644 --- a/test/fixtures/experimental/uncategorised/8/expected.json +++ b/test/fixtures/experimental/uncategorised/8/expected.json @@ -84,9 +84,11 @@ "column": 1 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, "operator": "**", "right": { @@ -119,9 +121,11 @@ "column": 7 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } }, @@ -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 41c7f66605..d01676b6ba 100644 --- a/test/fixtures/experimental/uncategorised/8/options.json +++ b/test/fixtures/experimental/uncategorised/8/options.json @@ -1,5 +1,3 @@ { - "features": { - "exponentiationOperator": true - } + "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 7fd805ebbe..4de042a697 100644 --- a/test/fixtures/experimental/uncategorised/9/options.json +++ b/test/fixtures/experimental/uncategorised/9/options.json @@ -1,5 +1,3 @@ { - "features": { - "objectRestSpread": true - } + "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 4b8d16c85b..887e105b6e 100644 --- a/test/fixtures/flow/declare-module/2/expected.json +++ b/test/fixtures/flow/declare-module/2/expected.json @@ -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,6 +79,7 @@ "body": [] } } - ] + ], + "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 05a90ee573..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": { "asyncFunctions": true } + "plugins": ["jsx", "flow", "asyncFunctions"] } diff --git a/test/fixtures/flow/regression/issue-2083/expected.json b/test/fixtures/flow/regression/issue-2083/expected.json index b6f6514238..f56868b0ee 100644 --- a/test/fixtures/flow/regression/issue-2083/expected.json +++ b/test/fixtures/flow/regression/issue-2083/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "body": { "type": "BlockStatement", @@ -169,9 +168,11 @@ "column": 13 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, "cases": [ { @@ -300,12 +301,15 @@ }, "computed": false }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } ] } - ] + ], + "directives": [] } } }, @@ -359,7 +363,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "body": { "type": "BlockStatement", @@ -449,11 +452,15 @@ "column": 23 } }, - "value": 4, - "rawValue": 4, - "raw": "4" + "extra": { + "rawValue": 4, + "raw": "4" + }, + "value": 4 }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } }, "operator": "|", "right": { @@ -475,13 +482,15 @@ }, "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 21c02d7040..0febab6ded 100644 --- a/test/fixtures/flow/tuples/3/expected.json +++ b/test/fixtures/flow/tuples/3/expected.json @@ -149,9 +149,11 @@ "column": 24 } }, - "value": 123, - "rawValue": 123, - "raw": "123" + "extra": { + "rawValue": 123, + "raw": "123" + }, + "value": 123 } ] } @@ -159,6 +161,7 @@ ], "kind": "var" } - ] + ], + "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 17eb3accf4..4834619f1a 100644 --- a/test/fixtures/flow/tuples/4/expected.json +++ b/test/fixtures/flow/tuples/4/expected.json @@ -164,9 +164,11 @@ "column": 31 } }, - "value": 123, - "rawValue": 123, - "raw": "123" + "extra": { + "rawValue": 123, + "raw": "123" + }, + "value": 123 }, { "type": "StringLiteral", @@ -182,9 +184,11 @@ "column": 39 } }, - "value": "duck", - "rawValue": "duck", - "raw": "\"duck\"" + "extra": { + "rawValue": "duck", + "raw": "\"duck\"" + }, + "value": "duck" } ] } @@ -192,6 +196,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file 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..455aaeaa26 100644 --- a/test/fixtures/flow/type-annotations/20/expected.json +++ b/test/fixtures/flow/type-annotations/20/expected.json @@ -139,7 +139,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -202,7 +201,8 @@ "column": 30 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -210,7 +210,7 @@ } } } - ] - }, - "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..3360af33e4 100644 --- a/test/fixtures/flow/type-annotations/21/expected.json +++ b/test/fixtures/flow/type-annotations/21/expected.json @@ -139,7 +139,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -232,7 +231,8 @@ "column": 35 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -240,7 +240,7 @@ } } } - ] - }, - "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..2d660b9f77 100644 --- a/test/fixtures/flow/type-annotations/22/expected.json +++ b/test/fixtures/flow/type-annotations/22/expected.json @@ -139,7 +139,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -185,7 +184,8 @@ "column": 25 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -193,7 +193,7 @@ } } } - ] - }, - "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..75457f8544 100644 --- a/test/fixtures/flow/type-annotations/23/expected.json +++ b/test/fixtures/flow/type-annotations/23/expected.json @@ -139,7 +139,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -266,7 +265,8 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] }, "typeParameters": { "type": "TypeParameterDeclaration", @@ -307,7 +307,7 @@ } } } - ] - }, - "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..9990d3f183 100644 --- a/test/fixtures/flow/type-annotations/24/expected.json +++ b/test/fixtures/flow/type-annotations/24/expected.json @@ -139,7 +139,6 @@ "id": null, "generator": true, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -266,7 +265,8 @@ "column": 21 } }, - "body": [] + "body": [], + "directives": [] }, "typeParameters": { "type": "TypeParameterDeclaration", @@ -307,7 +307,7 @@ } } } - ] - }, - "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 1b09f8300e..c59c5c0979 100644 --- a/test/fixtures/flow/type-annotations/26/expected.json +++ b/test/fixtures/flow/type-annotations/26/expected.json @@ -119,9 +119,11 @@ "column": 6 } }, - "value": 123, - "rawValue": 123, - "raw": "123" + "extra": { + "rawValue": 123, + "raw": "123" + }, + "value": 123 }, "kind": "init", "value": { @@ -141,7 +143,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -268,7 +269,8 @@ "column": 21 } }, - "body": [] + "body": [], + "directives": [] }, "typeParameters": { "type": "TypeParameterDeclaration", @@ -309,6 +311,7 @@ } } } - ] + ], + "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..7e23e4be3b 100644 --- a/test/fixtures/flow/type-annotations/27/expected.json +++ b/test/fixtures/flow/type-annotations/27/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -187,14 +186,15 @@ "column": 38 } }, - "body": [] + "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..23a7b26c0b 100644 --- a/test/fixtures/flow/type-annotations/28/expected.json +++ b/test/fixtures/flow/type-annotations/28/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -217,14 +216,15 @@ "column": 43 } }, - "body": [] + "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..69dab292da 100644 --- a/test/fixtures/flow/type-annotations/29/expected.json +++ b/test/fixtures/flow/type-annotations/29/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -170,14 +169,15 @@ "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 a13ad52d6e..ef5ec6c1fb 100644 --- a/test/fixtures/flow/type-annotations/44/expected.json +++ b/test/fixtures/flow/type-annotations/44/expected.json @@ -180,9 +180,11 @@ "column": 24 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 }, { "type": "NumberLiteral", @@ -198,9 +200,11 @@ "column": 27 } }, - "value": 2, - "rawValue": 2, - "raw": "2" + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 }, { "type": "NumberLiteral", @@ -216,9 +220,11 @@ "column": 30 } }, - "value": 3, - "rawValue": 3, - "raw": "3" + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } ] } @@ -226,6 +232,7 @@ ], "kind": "var" } - ] + ], + "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 d251f51520..84759bfbc6 100644 --- a/test/fixtures/flow/type-annotations/50/expected.json +++ b/test/fixtures/flow/type-annotations/50/expected.json @@ -157,7 +157,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "returnType": { "type": "TypeAnnotation", @@ -232,12 +231,15 @@ "column": 42 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] }, "typeParameters": { "type": "TypeParameterDeclaration", @@ -277,6 +279,7 @@ ] } } - ] + ], + "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 1168baaca8..be9240f72e 100644 --- a/test/fixtures/flow/type-annotations/51/expected.json +++ b/test/fixtures/flow/type-annotations/51/expected.json @@ -103,9 +103,11 @@ "column": 17 } }, - "value": "bar", - "rawValue": "bar", - "raw": "\"bar\"" + "extra": { + "rawValue": "bar", + "raw": "\"bar\"" + }, + "value": "bar" }, "static": false, "kind": "method", @@ -126,7 +128,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [], "body": { "type": "BlockStatement", @@ -142,7 +143,8 @@ "column": 26 } }, - "body": [] + "body": [], + "directives": [] }, "typeParameters": { "type": "TypeParameterDeclaration", @@ -182,6 +184,7 @@ ] } } - ] + ], + "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 7b5fe45e43..739d25f879 100644 --- a/test/fixtures/flow/type-annotations/55/expected.json +++ b/test/fixtures/flow/type-annotations/55/expected.json @@ -149,14 +149,17 @@ "column": 27 } }, - "value": 4, - "rawValue": 4, - "raw": "4" + "extra": { + "rawValue": 4, + "raw": "4" + }, + "value": 4 } } ], "kind": "var" } - ] + ], + "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..ac710d4778 100644 --- a/test/fixtures/flow/type-annotations/56/expected.json +++ b/test/fixtures/flow/type-annotations/56/expected.json @@ -124,7 +124,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "params": [ { "type": "Identifier", @@ -219,14 +218,15 @@ "column": 46 } }, - "body": [] + "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 e74d96fd69..69d4f65178 100644 --- a/test/fixtures/flow/type-annotations/60/expected.json +++ b/test/fixtures/flow/type-annotations/60/expected.json @@ -268,9 +268,11 @@ "column": 37 } }, - "value": "hello", - "rawValue": "hello", - "raw": "\"hello\"" + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" }, "kind": "init" } @@ -280,6 +282,7 @@ ], "kind": "var" } - ] + ], + "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 e0d9d00c06..c09b9c0fec 100644 --- a/test/fixtures/flow/type-annotations/61/expected.json +++ b/test/fixtures/flow/type-annotations/61/expected.json @@ -268,9 +268,11 @@ "column": 36 } }, - "value": "hello", - "rawValue": "hello", - "raw": "\"hello\"" + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" }, "kind": "init" } @@ -280,6 +282,7 @@ ], "kind": "var" } - ] + ], + "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 505317d656..7201193e8a 100644 --- a/test/fixtures/flow/type-annotations/62/expected.json +++ b/test/fixtures/flow/type-annotations/62/expected.json @@ -197,9 +197,11 @@ "column": 34 } }, - "value": "hello", - "rawValue": "hello", - "raw": "\"hello\"" + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" } ] } @@ -207,6 +209,7 @@ ], "kind": "var" } - ] + ], + "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..c67a31a154 100644 --- a/test/fixtures/flow/type-annotations/63/expected.json +++ b/test/fixtures/flow/type-annotations/63/expected.json @@ -60,7 +60,6 @@ }, "generator": false, "expression": false, - "async": false, "params": [ { "type": "ObjectPattern", @@ -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 6a74fc876f..fafb7c0a97 100644 --- a/test/fixtures/flow/type-annotations/89/expected.json +++ b/test/fixtures/flow/type-annotations/89/expected.json @@ -90,11 +90,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/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 645f92bcbf..d18d05b185 100644 --- a/test/fixtures/flow/type-annotations/90/expected.json +++ b/test/fixtures/flow/type-annotations/90/expected.json @@ -90,11 +90,14 @@ "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/flow/type-annotations/91/expected.json b/test/fixtures/flow/type-annotations/91/expected.json index 58a81038df..508d8b7fd6 100644 --- a/test/fixtures/flow/type-annotations/91/expected.json +++ b/test/fixtures/flow/type-annotations/91/expected.json @@ -153,11 +153,14 @@ "column": 33 } }, - "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/flow/type-annotations/92/expected.json b/test/fixtures/flow/type-annotations/92/expected.json index 3877416eba..3bf07813d5 100644 --- a/test/fixtures/flow/type-annotations/92/expected.json +++ b/test/fixtures/flow/type-annotations/92/expected.json @@ -106,11 +106,14 @@ "column": 37 } }, - "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/flow/type-annotations/93/expected.json b/test/fixtures/flow/type-annotations/93/expected.json index 11fcfc35ba..588d644b5a 100644 --- a/test/fixtures/flow/type-annotations/93/expected.json +++ b/test/fixtures/flow/type-annotations/93/expected.json @@ -90,11 +90,14 @@ "column": 22 } }, - "value": "foo", - "rawValue": "foo", - "raw": "\"foo\"" + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" } } - ] + ], + "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 f12baf85de..71f88f5ecd 100644 --- a/test/fixtures/flow/type-annotations/94/expected.json +++ b/test/fixtures/flow/type-annotations/94/expected.json @@ -137,11 +137,14 @@ "column": 29 } }, - "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/flow/type-annotations/95/expected.json b/test/fixtures/flow/type-annotations/95/expected.json index 770d5376af..d90a424b63 100644 --- a/test/fixtures/flow/type-annotations/95/expected.json +++ b/test/fixtures/flow/type-annotations/95/expected.json @@ -90,11 +90,14 @@ "column": 37 } }, - "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/flow/type-annotations/96/expected.json b/test/fixtures/flow/type-annotations/96/expected.json index 4570cc24e3..11ed46da39 100644 --- a/test/fixtures/flow/type-annotations/96/expected.json +++ b/test/fixtures/flow/type-annotations/96/expected.json @@ -90,11 +90,14 @@ "column": 39 } }, - "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/flow/type-annotations/97/expected.json b/test/fixtures/flow/type-annotations/97/expected.json index e23eb4353e..ad6352b9a0 100644 --- a/test/fixtures/flow/type-annotations/97/expected.json +++ b/test/fixtures/flow/type-annotations/97/expected.json @@ -107,7 +107,6 @@ "id": null, "generator": false, "expression": false, - "async": false, "typeParameters": { "type": "TypeParameterDeclaration", "start": 14, @@ -156,15 +155,19 @@ "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 a02b5f1134..583326b8a1 100644 --- a/test/fixtures/flow/type-exports/specifier-from/expected.json +++ b/test/fixtures/flow/type-exports/specifier-from/expected.json @@ -105,13 +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 d336563032..48639097eb 100644 --- a/test/fixtures/flow/typecasts/2/expected.json +++ b/test/fixtures/flow/typecasts/2/expected.json @@ -118,9 +118,11 @@ "column": 8 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "kind": "init" }, @@ -171,9 +173,11 @@ "column": 20 } }, - "value": "hey", - "rawValue": "hey", - "raw": "\"hey\"" + "extra": { + "rawValue": "hey", + "raw": "\"hey\"" + }, + "value": "hey" }, "kind": "init" } @@ -307,9 +311,12 @@ "indexers": [] } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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 b11b08e49e..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", @@ -137,9 +136,11 @@ "column": 17 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } }, @@ -239,9 +240,12 @@ "typeParameters": null } }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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/computed-properties/call-expression/expected.json b/test/fixtures/harmony/computed-properties/call-expression/expected.json index ffcd91d394..df195bb3a8 100644 --- a/test/fixtures/harmony/computed-properties/call-expression/expected.json +++ b/test/fixtures/harmony/computed-properties/call-expression/expected.json @@ -151,9 +151,11 @@ "column": 13 } }, - "value": "", - "rawValue": "", - "raw": "\"\"" + "extra": { + "rawValue": "", + "raw": "\"\"" + }, + "value": "" }, "kind": "init" } @@ -163,6 +165,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file 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 index c204457d46..499e822973 100644 --- 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 @@ -43,7 +43,7 @@ } }, "declaration": { - "type": "FunctionExpression", + "type": "FunctionDeclaration", "start": 15, "end": 29, "loc": { @@ -74,7 +74,8 @@ "column": 29 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -107,9 +108,12 @@ } }, "name": "foo", - "parenthesizedExpression": true + "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/uncategorised/1/expected.json b/test/fixtures/harmony/uncategorised/1/expected.json index 6a4ff90185..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": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 18, "loc": { @@ -56,9 +57,11 @@ "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}" + } } } ] diff --git a/test/fixtures/harmony/uncategorised/10/expected.json b/test/fixtures/harmony/uncategorised/10/expected.json index 263b4b83d5..742740cf25 100644 --- a/test/fixtures/harmony/uncategorised/10/expected.json +++ b/test/fixtures/harmony/uncategorised/10/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 2, - "rawValue": 2, - "raw": "0O2" + "extra": { + "rawValue": 2, + "raw": "0O2" + }, + "value": 2 } } - ] + ], + "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/106/expected.json b/test/fixtures/harmony/uncategorised/106/expected.json index 2e0186e88f..f5ac697314 100644 --- a/test/fixtures/harmony/uncategorised/106/expected.json +++ b/test/fixtures/harmony/uncategorised/106/expected.json @@ -133,18 +133,24 @@ "column": 30 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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 372c9fce63..360fcb62c6 100644 --- a/test/fixtures/harmony/uncategorised/11/expected.json +++ b/test/fixtures/harmony/uncategorised/11/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 10, - "rawValue": 10, - "raw": "0O12" + "extra": { + "rawValue": 10, + "raw": "0O12" + }, + "value": 10 } } - ] + ], + "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 607cd3e194..8e5a64d7e3 100644 --- a/test/fixtures/harmony/uncategorised/12/expected.json +++ b/test/fixtures/harmony/uncategorised/12/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0b0" + "extra": { + "rawValue": 0, + "raw": "0b0" + }, + "value": 0 } } - ] + ], + "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 76c74308aa..83a2d03682 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": "StringLiteral", - "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, @@ -233,13 +200,53 @@ "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" + } } } ] diff --git a/test/fixtures/harmony/uncategorised/124/expected.json b/test/fixtures/harmony/uncategorised/124/expected.json index 964171a1ab..b3af6621a1 100644 --- a/test/fixtures/harmony/uncategorised/124/expected.json +++ b/test/fixtures/harmony/uncategorised/124/expected.json @@ -103,9 +103,11 @@ "column": 22 } }, - "value": "constructor", - "rawValue": "constructor", - "raw": "'constructor'" + "extra": { + "rawValue": "constructor", + "raw": "'constructor'" + }, + "value": "constructor" }, "static": false, "kind": "constructor", @@ -141,13 +143,15 @@ "column": 27 } }, - "body": [] + "body": [], + "directives": [] } } } ] } } - ] + ], + "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 23356e76be..869a4573f6 100644 --- a/test/fixtures/harmony/uncategorised/13/expected.json +++ b/test/fixtures/harmony/uncategorised/13/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 1, - "rawValue": 1, - "raw": "0b1" + "extra": { + "rawValue": 1, + "raw": "0b1" + }, + "value": 1 } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/130/expected.json b/test/fixtures/harmony/uncategorised/130/expected.json index 6f0fe5e565..19d9b17be0 100644 --- a/test/fixtures/harmony/uncategorised/130/expected.json +++ b/test/fixtures/harmony/uncategorised/130/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": "StringLiteral", - "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, @@ -233,13 +200,53 @@ "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" + } } } ] diff --git a/test/fixtures/harmony/uncategorised/14/expected.json b/test/fixtures/harmony/uncategorised/14/expected.json index be3c47afa8..946f9be4db 100644 --- a/test/fixtures/harmony/uncategorised/14/expected.json +++ b/test/fixtures/harmony/uncategorised/14/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 2, - "rawValue": 2, - "raw": "0b10" + "extra": { + "rawValue": 2, + "raw": "0b10" + }, + "value": 2 } } - ] + ], + "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 d47fdad79c..9c4ce67855 100644 --- a/test/fixtures/harmony/uncategorised/141/expected.json +++ b/test/fixtures/harmony/uncategorised/141/expected.json @@ -104,16 +104,21 @@ "column": 9 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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 259c9600a4..6198ec9aa5 100644 --- a/test/fixtures/harmony/uncategorised/142/expected.json +++ b/test/fixtures/harmony/uncategorised/142/expected.json @@ -102,9 +102,11 @@ "column": 6 } }, - "value": "x", - "rawValue": "x", - "raw": "\"x\"" + "extra": { + "rawValue": "x", + "raw": "\"x\"" + }, + "value": "x" }, "operator": "+", "right": { @@ -121,9 +123,11 @@ "column": 12 } }, - "value": "y", - "rawValue": "y", - "raw": "\"y\"" + "extra": { + "rawValue": "y", + "raw": "\"y\"" + }, + "value": "y" } }, "value": { @@ -140,16 +144,21 @@ "column": 17 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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..01caab9e66 100644 --- a/test/fixtures/harmony/uncategorised/143/expected.json +++ b/test/fixtures/harmony/uncategorised/143/expected.json @@ -122,16 +122,19 @@ "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 2e3bc139b5..25f8cb97cc 100644 --- a/test/fixtures/harmony/uncategorised/144/expected.json +++ b/test/fixtures/harmony/uncategorised/144/expected.json @@ -104,9 +104,11 @@ "column": 9 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" }, @@ -157,16 +159,21 @@ "column": 16 } }, - "value": 20, - "rawValue": 20, - "raw": "20" + "extra": { + "rawValue": 20, + "raw": "20" + }, + "value": 20 }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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..89a62e0093 100644 --- a/test/fixtures/harmony/uncategorised/145/expected.json +++ b/test/fixtures/harmony/uncategorised/145/expected.json @@ -123,7 +123,8 @@ "column": 14 } }, - "body": [] + "body": [], + "directives": [] } } }, @@ -210,15 +211,18 @@ "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..68e454ca7f 100644 --- a/test/fixtures/harmony/uncategorised/146/expected.json +++ b/test/fixtures/harmony/uncategorised/146/expected.json @@ -123,15 +123,18 @@ "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/15/expected.json b/test/fixtures/harmony/uncategorised/15/expected.json index ae57cab25c..50c71c2d94 100644 --- a/test/fixtures/harmony/uncategorised/15/expected.json +++ b/test/fixtures/harmony/uncategorised/15/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0B0" + "extra": { + "rawValue": 0, + "raw": "0B0" + }, + "value": 0 } } - ] + ], + "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 f48012f5a7..0a09df6992 100644 --- a/test/fixtures/harmony/uncategorised/152/expected.json +++ b/test/fixtures/harmony/uncategorised/152/expected.json @@ -137,9 +137,11 @@ "column": 19 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } ] } @@ -159,9 +161,11 @@ "column": 24 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "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 c58bffb9c1..5830686c0b 100644 --- a/test/fixtures/harmony/uncategorised/153/expected.json +++ b/test/fixtures/harmony/uncategorised/153/expected.json @@ -205,9 +205,11 @@ "column": 23 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -229,9 +231,11 @@ "column": 28 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "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 da3399ea06..c27822598f 100644 --- a/test/fixtures/harmony/uncategorised/154/expected.json +++ b/test/fixtures/harmony/uncategorised/154/expected.json @@ -235,9 +235,11 @@ "column": 25 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -259,11 +261,13 @@ "column": 30 } }, - "body": [] + "body": [], + "directives": [] } } } } - ] + ], + "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 e1d8689d55..4892fdd837 100644 --- a/test/fixtures/harmony/uncategorised/155/expected.json +++ b/test/fixtures/harmony/uncategorised/155/expected.json @@ -252,9 +252,11 @@ "column": 26 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -276,15 +278,19 @@ "column": 31 } }, - "body": [] + "body": [], + "directives": [] } }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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 02567ac39f..f918574a30 100644 --- a/test/fixtures/harmony/uncategorised/156/expected.json +++ b/test/fixtures/harmony/uncategorised/156/expected.json @@ -253,9 +253,11 @@ "column": 16 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -277,14 +279,18 @@ "column": 21 } }, - "body": [] + "body": [], + "directives": [] } } } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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 2995b318d4..519875cdd1 100644 --- a/test/fixtures/harmony/uncategorised/157/expected.json +++ b/test/fixtures/harmony/uncategorised/157/expected.json @@ -268,9 +268,11 @@ "column": 22 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -292,15 +294,19 @@ "column": 27 } }, - "body": [] + "body": [], + "directives": [] } } } ] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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 a58c38c687..126c8430f4 100644 --- a/test/fixtures/harmony/uncategorised/158/expected.json +++ b/test/fixtures/harmony/uncategorised/158/expected.json @@ -204,9 +204,11 @@ "column": 14 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -228,11 +230,15 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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 8f7d2304f4..3799c4ee35 100644 --- a/test/fixtures/harmony/uncategorised/159/expected.json +++ b/test/fixtures/harmony/uncategorised/159/expected.json @@ -135,9 +135,11 @@ "column": 18 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -155,11 +157,13 @@ "column": 22 } }, - "body": [] + "body": [], + "directives": [] } } } } - ] + ], + "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 4937dfc854..94253b3ff7 100644 --- a/test/fixtures/harmony/uncategorised/16/expected.json +++ b/test/fixtures/harmony/uncategorised/16/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 1, - "rawValue": 1, - "raw": "0B1" + "extra": { + "rawValue": 1, + "raw": "0B1" + }, + "value": 1 } } - ] + ], + "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 beb32095e0..b922dc9f54 100644 --- a/test/fixtures/harmony/uncategorised/160/expected.json +++ b/test/fixtures/harmony/uncategorised/160/expected.json @@ -105,9 +105,11 @@ "column": 16 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -125,9 +127,11 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "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 133d3320bc..0fdbc8a52e 100644 --- a/test/fixtures/harmony/uncategorised/161/expected.json +++ b/test/fixtures/harmony/uncategorised/161/expected.json @@ -183,9 +183,11 @@ "column": 21 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -203,7 +205,8 @@ "column": 25 } }, - "body": [] + "body": [], + "directives": [] } }, "kind": "init" @@ -212,6 +215,7 @@ } } } - ] + ], + "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 36f0dea590..95a9a2ba3e 100644 --- a/test/fixtures/harmony/uncategorised/162/expected.json +++ b/test/fixtures/harmony/uncategorised/162/expected.json @@ -184,9 +184,11 @@ "column": 11 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -204,7 +206,8 @@ "column": 15 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -212,6 +215,7 @@ } } } - ] + ], + "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 e6cfe9f05a..5a539443cf 100644 --- a/test/fixtures/harmony/uncategorised/17/expected.json +++ b/test/fixtures/harmony/uncategorised/17/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 2, - "rawValue": 2, - "raw": "0B10" + "extra": { + "rawValue": 2, + "raw": "0B10" + }, + "value": 2 } } - ] + ], + "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..7d82cfb3bb 100644 --- a/test/fixtures/harmony/uncategorised/170/expected.json +++ b/test/fixtures/harmony/uncategorised/170/expected.json @@ -209,12 +209,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..870de96929 100644 --- a/test/fixtures/harmony/uncategorised/173/expected.json +++ b/test/fixtures/harmony/uncategorised/173/expected.json @@ -173,15 +173,18 @@ "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/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/195/expected.json b/test/fixtures/harmony/uncategorised/195/expected.json index 0f0150fd2b..908ecf8753 100644 --- a/test/fixtures/harmony/uncategorised/195/expected.json +++ b/test/fixtures/harmony/uncategorised/195/expected.json @@ -56,11 +56,14 @@ "column": 8 } }, - "raw": "/[a-z]/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 13ccb35613..04066b5458 100644 --- a/test/fixtures/harmony/uncategorised/196/expected.json +++ b/test/fixtures/harmony/uncategorised/196/expected.json @@ -56,11 +56,14 @@ "column": 33 } }, - "raw": "/[\\uD834\\uDF06-\\uD834\\uDF08a-z]/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 aa7ff354b4..ca35fe564c 100644 --- a/test/fixtures/harmony/uncategorised/197/expected.json +++ b/test/fixtures/harmony/uncategorised/197/expected.json @@ -56,7 +56,8 @@ "column": 5 } }, - "body": [] + "body": [], + "directives": [] }, "test": { "type": "BooleanLiteral", @@ -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 5a854ab9f5..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": "StringLiteral", + "value": { + "type": "DirectiveLiteral", "start": 0, "end": 27, "loc": { @@ -56,9 +57,11 @@ "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}" + } } } ] 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 3d0fad6ce6..04ca39f3c8 100644 --- a/test/fixtures/harmony/uncategorised/256/expected.json +++ b/test/fixtures/harmony/uncategorised/256/expected.json @@ -87,12 +87,15 @@ "column": 9 } }, - "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/harmony/uncategorised/257/expected.json b/test/fixtures/harmony/uncategorised/257/expected.json index 3aef2ac8d9..e424fec694 100644 --- a/test/fixtures/harmony/uncategorised/257/expected.json +++ b/test/fixtures/harmony/uncategorised/257/expected.json @@ -122,13 +122,16 @@ "column": 14 } }, - "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/harmony/uncategorised/259/expected.json b/test/fixtures/harmony/uncategorised/259/expected.json index 970d0563d8..8dbb933a6c 100644 --- a/test/fixtures/harmony/uncategorised/259/expected.json +++ b/test/fixtures/harmony/uncategorised/259/expected.json @@ -134,17 +134,23 @@ "column": 24 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } } - ] + ], + "directives": [] }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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 08ba30f47d..a5de31017e 100644 --- a/test/fixtures/harmony/uncategorised/26/expected.json +++ b/test/fixtures/harmony/uncategorised/26/expected.json @@ -167,9 +167,11 @@ "column": 18 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 }, "kind": "init" } @@ -255,12 +257,15 @@ "column": 54 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } - ] + ], + "directives": [] } } ], @@ -372,6 +377,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 880504f34d..0000000000 --- a/test/fixtures/harmony/uncategorised/269/options.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "features": { - "comprehensions": true - }, - "throws": "Unexpected token (1:6)" -} diff --git a/test/fixtures/harmony/uncategorised/27/expected.json b/test/fixtures/harmony/uncategorised/27/expected.json index e61945111a..2d90f27140 100644 --- a/test/fixtures/harmony/uncategorised/27/expected.json +++ b/test/fixtures/harmony/uncategorised/27/expected.json @@ -133,9 +133,11 @@ "column": 37 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } ], @@ -172,13 +174,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/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 880504f34d..0000000000 --- a/test/fixtures/harmony/uncategorised/270/options.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "features": { - "comprehensions": true - }, - "throws": "Unexpected token (1:6)" -} 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 880504f34d..0000000000 --- a/test/fixtures/harmony/uncategorised/271/options.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "features": { - "comprehensions": true - }, - "throws": "Unexpected token (1:6)" -} 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 dad599c3b8..0000000000 --- a/test/fixtures/harmony/uncategorised/272/options.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "features": { - "comprehensions": true - }, - "throws": "Unexpected token (1:8)" -} 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 9b7c4355a5..0000000000 --- a/test/fixtures/harmony/uncategorised/274/options.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "features": { - "comprehensions": true - }, - "throws": "Unexpected token (1:14)" -} diff --git a/test/fixtures/harmony/uncategorised/28/expected.json b/test/fixtures/harmony/uncategorised/28/expected.json index ed4c1605fe..6b22652418 100644 --- a/test/fixtures/harmony/uncategorised/28/expected.json +++ b/test/fixtures/harmony/uncategorised/28/expected.json @@ -74,12 +74,15 @@ "column": 12 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "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/29/expected.json b/test/fixtures/harmony/uncategorised/29/expected.json index c3e068731d..070478ffa3 100644 --- a/test/fixtures/harmony/uncategorised/29/expected.json +++ b/test/fixtures/harmony/uncategorised/29/expected.json @@ -91,12 +91,15 @@ "column": 11 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "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/3/expected.json b/test/fixtures/harmony/uncategorised/3/expected.json index 1e3d179cd6..bcf619d9dd 100644 --- a/test/fixtures/harmony/uncategorised/3/expected.json +++ b/test/fixtures/harmony/uncategorised/3/expected.json @@ -56,11 +56,14 @@ "column": 2 } }, - "value": 0, - "rawValue": 0, - "raw": "00" + "extra": { + "rawValue": 0, + "raw": "00" + }, + "value": 0 } } - ] + ], + "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 dc38971fa7..71885e218e 100644 --- a/test/fixtures/harmony/uncategorised/30/expected.json +++ b/test/fixtures/harmony/uncategorised/30/expected.json @@ -91,12 +91,15 @@ "column": 13 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "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 89a1eb3ff5..5cdf1b449d 100644 --- a/test/fixtures/harmony/uncategorised/300/expected.json +++ b/test/fixtures/harmony/uncategorised/300/expected.json @@ -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 448e59b1ff..2e575ba5c1 100644 --- a/test/fixtures/harmony/uncategorised/301/expected.json +++ b/test/fixtures/harmony/uncategorised/301/expected.json @@ -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/307/expected.json b/test/fixtures/harmony/uncategorised/307/expected.json index 293ea2a087..fa5a1fed3e 100644 --- a/test/fixtures/harmony/uncategorised/307/expected.json +++ b/test/fixtures/harmony/uncategorised/307/expected.json @@ -150,9 +150,11 @@ "column": 7 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } @@ -174,9 +176,12 @@ }, "name": "obj" }, - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } - ] + ], + "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 2517a00a40..f13152264e 100644 --- a/test/fixtures/harmony/uncategorised/308/expected.json +++ b/test/fixtures/harmony/uncategorised/308/expected.json @@ -153,9 +153,11 @@ "column": 7 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } @@ -180,6 +182,7 @@ } } } - ] + ], + "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 78a133f6c2..21ff2e2c8b 100644 --- a/test/fixtures/harmony/uncategorised/309/expected.json +++ b/test/fixtures/harmony/uncategorised/309/expected.json @@ -229,9 +229,11 @@ "column": 14 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } } @@ -261,6 +263,7 @@ } } } - ] + ], + "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 4bdd74c258..57366e881f 100644 --- a/test/fixtures/harmony/uncategorised/31/expected.json +++ b/test/fixtures/harmony/uncategorised/31/expected.json @@ -107,12 +107,15 @@ "column": 16 } }, - "value": "test", - "rawValue": "test", - "raw": "\"test\"" + "extra": { + "rawValue": "test", + "raw": "\"test\"" + }, + "value": "test" } } } - ] + ], + "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 aba62152a7..efd6b8cb0f 100644 --- a/test/fixtures/harmony/uncategorised/310/expected.json +++ b/test/fixtures/harmony/uncategorised/310/expected.json @@ -135,9 +135,11 @@ "column": 11 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 } } } @@ -175,6 +177,7 @@ } } } - ] + ], + "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 49647b97c8..69257a35a5 100644 --- a/test/fixtures/harmony/uncategorised/317/expected.json +++ b/test/fixtures/harmony/uncategorised/317/expected.json @@ -113,7 +113,9 @@ "column": 7 } }, - "raw": "/\\d/", + "extra": { + "raw": "/\\d/" + }, "pattern": "\\d", "flags": "" }, @@ -150,9 +152,11 @@ "column": 16 } }, - "value": "1", - "rawValue": "1", - "raw": "'1'" + "extra": { + "rawValue": "1", + "raw": "'1'" + }, + "value": "1" } ] }, @@ -170,9 +174,11 @@ "column": 19 } }, - "value": 0, - "rawValue": 0, - "raw": "0" + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, "computed": true } @@ -221,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 bb330b9204..becd7dd80d 100644 --- a/test/fixtures/harmony/uncategorised/318/expected.json +++ b/test/fixtures/harmony/uncategorised/318/expected.json @@ -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 136c5bbf00..63f3b5c58b 100644 --- a/test/fixtures/harmony/uncategorised/319/expected.json +++ b/test/fixtures/harmony/uncategorised/319/expected.json @@ -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 ebd04a794b..a6acfabee4 100644 --- a/test/fixtures/harmony/uncategorised/32/expected.json +++ b/test/fixtures/harmony/uncategorised/32/expected.json @@ -120,15 +120,19 @@ "column": 9 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] } } } - ] + ], + "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 e03993bade..95f406a78c 100644 --- a/test/fixtures/harmony/uncategorised/320/expected.json +++ b/test/fixtures/harmony/uncategorised/320/expected.json @@ -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/322/expected.json b/test/fixtures/harmony/uncategorised/322/expected.json index 4accd0cb4a..c3bfc6c465 100644 --- a/test/fixtures/harmony/uncategorised/322/expected.json +++ b/test/fixtures/harmony/uncategorised/322/expected.json @@ -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 7a3afe8bd4..fbd87bd0c4 100644 --- a/test/fixtures/harmony/uncategorised/33/expected.json +++ b/test/fixtures/harmony/uncategorised/33/expected.json @@ -139,17 +139,22 @@ "column": 20 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 }, "kind": "init" } ], - "parenthesizedExpression": true + "extra": { + "parenthesized": true + } } } } - ] + ], + "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/338/expected.json b/test/fixtures/harmony/uncategorised/338/expected.json index 1f7043e170..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": [] } } }, @@ -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 287f532194..fe17cfad68 100644 --- a/test/fixtures/harmony/uncategorised/34/expected.json +++ b/test/fixtures/harmony/uncategorised/34/expected.json @@ -134,9 +134,11 @@ "column": 16 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } }, "label": { @@ -156,10 +158,12 @@ "name": "label" } } - ] + ], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/harmony/uncategorised/35/expected.json b/test/fixtures/harmony/uncategorised/35/expected.json index 9a918edee0..59f0dbf100 100644 --- a/test/fixtures/harmony/uncategorised/35/expected.json +++ b/test/fixtures/harmony/uncategorised/35/expected.json @@ -136,15 +136,19 @@ "column": 14 } }, - "value": 42, - "rawValue": 42, - "raw": "42" + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - ] + ], + "directives": [] } } } - ] + ], + "directives": [] } } \ No newline at end of file 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/36/expected.json b/test/fixtures/harmony/uncategorised/36/expected.json index a1ba25b09e..d9a7158baa 100644 --- a/test/fixtures/harmony/uncategorised/36/expected.json +++ b/test/fixtures/harmony/uncategorised/36/expected.json @@ -125,12 +125,15 @@ "column": 16 } }, - "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/harmony/uncategorised/39/expected.json b/test/fixtures/harmony/uncategorised/39/expected.json index 8b3e1161d1..1d3eb7338f 100644 --- a/test/fixtures/harmony/uncategorised/39/expected.json +++ b/test/fixtures/harmony/uncategorised/39/expected.json @@ -104,9 +104,11 @@ "column": 4 } }, - "value": 1, - "rawValue": 1, - "raw": "1" + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 } } ], @@ -160,6 +162,7 @@ } } } - ] + ], + "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 ccdde2fe5f..8a021344bb 100644 --- a/test/fixtures/harmony/uncategorised/4/expected.json +++ b/test/fixtures/harmony/uncategorised/4/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0o0" + "extra": { + "rawValue": 0, + "raw": "0o0" + }, + "value": 0 } } - ] + ], + "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 3351297bbe..b4e861da61 100644 --- a/test/fixtures/harmony/uncategorised/40/expected.json +++ b/test/fixtures/harmony/uncategorised/40/expected.json @@ -91,12 +91,15 @@ "column": 10 } }, - "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/harmony/uncategorised/41/expected.json b/test/fixtures/harmony/uncategorised/41/expected.json index cdb3afb5bc..f3bbc75306 100644 --- a/test/fixtures/harmony/uncategorised/41/expected.json +++ b/test/fixtures/harmony/uncategorised/41/expected.json @@ -91,12 +91,15 @@ "column": 15 } }, - "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/harmony/uncategorised/42/expected.json b/test/fixtures/harmony/uncategorised/42/expected.json index c40f9bbb31..98652468ab 100644 --- a/test/fixtures/harmony/uncategorised/42/expected.json +++ b/test/fixtures/harmony/uncategorised/42/expected.json @@ -91,12 +91,15 @@ "column": 9 } }, - "value": 0, - "rawValue": 0, - "raw": "00" + "extra": { + "rawValue": 0, + "raw": "00" + }, + "value": 0 } } } - ] + ], + "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 95224d5129..d4be8b7577 100644 --- a/test/fixtures/harmony/uncategorised/43/expected.json +++ b/test/fixtures/harmony/uncategorised/43/expected.json @@ -107,12 +107,15 @@ "column": 15 } }, - "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/harmony/uncategorised/44/expected.json b/test/fixtures/harmony/uncategorised/44/expected.json index 645860e175..8a08def13e 100644 --- a/test/fixtures/harmony/uncategorised/44/expected.json +++ b/test/fixtures/harmony/uncategorised/44/expected.json @@ -104,9 +104,11 @@ "column": 10 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], @@ -124,12 +126,15 @@ "column": 17 } }, - "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/harmony/uncategorised/45/expected.json b/test/fixtures/harmony/uncategorised/45/expected.json index fd39c13ced..b782563eff 100644 --- a/test/fixtures/harmony/uncategorised/45/expected.json +++ b/test/fixtures/harmony/uncategorised/45/expected.json @@ -120,9 +120,11 @@ "column": 13 } }, - "value": 10, - "rawValue": 10, - "raw": "10" + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 } } ], @@ -140,12 +142,15 @@ "column": 20 } }, - "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/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 8368737c3f..3fc7b625b7 100644 --- a/test/fixtures/harmony/uncategorised/47/expected.json +++ b/test/fixtures/harmony/uncategorised/47/expected.json @@ -126,13 +126,16 @@ "column": 12 } }, - "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/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 b8fdcdd6b2..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": "StringLiteral", - "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, @@ -137,14 +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" + } } } ] } } - ] + ], + "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 29fd63476c..e964b38846 100644 --- a/test/fixtures/harmony/uncategorised/54/expected.json +++ b/test/fixtures/harmony/uncategorised/54/expected.json @@ -119,9 +119,11 @@ "column": 14 } }, - "value": "method", - "rawValue": "method", - "raw": "'method'" + "extra": { + "rawValue": "method", + "raw": "'method'" + }, + "value": "method" }, "kind": "init", "value": { @@ -156,7 +158,8 @@ "column": 20 } }, - "body": [] + "body": [], + "directives": [] } } } @@ -164,6 +167,7 @@ } } } - ] + ], + "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 142b9fa2a0..0000000000 --- a/test/fixtures/harmony/uncategorised/57/options.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "features": { - "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/expected.json b/test/fixtures/harmony/uncategorised/58/expected.json deleted file mode 100644 index 26450dfeb4..0000000000 --- a/test/fixtures/harmony/uncategorised/58/expected.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "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": "ExpressionStatement", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "expression": { - "type": "ComprehensionExpression", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "blocks": [ - { - "type": "ComprehensionBlock", - "start": 1, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "left": { - "type": "Identifier", - "start": 6, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - }, - "name": "x" - }, - "right": { - "type": "Identifier", - "start": 11, - "end": 16, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "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 - } - }, - "name": "y" - }, - "right": { - "type": "Identifier", - "start": 28, - "end": 34, - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 34 - } - }, - "name": "array2" - } - } - ], - "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/harmony/uncategorised/58/options.json b/test/fixtures/harmony/uncategorised/58/options.json deleted file mode 100644 index 142b9fa2a0..0000000000 --- a/test/fixtures/harmony/uncategorised/58/options.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "features": { - "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/expected.json b/test/fixtures/harmony/uncategorised/59/expected.json deleted file mode 100644 index 438b7a59b1..0000000000 --- a/test/fixtures/harmony/uncategorised/59/expected.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "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": "ExpressionStatement", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "expression": { - "type": "ComprehensionExpression", - "start": 0, - "end": 54, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 54 - } - }, - "blocks": [ - { - "type": "ComprehensionBlock", - "start": 1, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "left": { - "type": "Identifier", - "start": 6, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - }, - "name": "x" - }, - "right": { - "type": "Identifier", - "start": 11, - "end": 16, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "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 - } - }, - "name": "y" - }, - "right": { - "type": "Identifier", - "start": 28, - "end": 34, - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 34 - } - }, - "name": "array2" - } - } - ], - "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/harmony/uncategorised/59/options.json b/test/fixtures/harmony/uncategorised/59/options.json deleted file mode 100644 index 142b9fa2a0..0000000000 --- a/test/fixtures/harmony/uncategorised/59/options.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "features": { - "comprehensions": true - } -} diff --git a/test/fixtures/harmony/uncategorised/6/expected.json b/test/fixtures/harmony/uncategorised/6/expected.json index 58c5a75980..118b2f32c6 100644 --- a/test/fixtures/harmony/uncategorised/6/expected.json +++ b/test/fixtures/harmony/uncategorised/6/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 2, - "rawValue": 2, - "raw": "0o2" + "extra": { + "rawValue": 2, + "raw": "0o2" + }, + "value": 2 } } - ] + ], + "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 142b9fa2a0..0000000000 --- a/test/fixtures/harmony/uncategorised/60/options.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "features": { - "comprehensions": true - } -} diff --git a/test/fixtures/harmony/uncategorised/7/expected.json b/test/fixtures/harmony/uncategorised/7/expected.json index fc506965ec..5636575a62 100644 --- a/test/fixtures/harmony/uncategorised/7/expected.json +++ b/test/fixtures/harmony/uncategorised/7/expected.json @@ -56,11 +56,14 @@ "column": 4 } }, - "value": 10, - "rawValue": 10, - "raw": "0o12" + "extra": { + "rawValue": 10, + "raw": "0o12" + }, + "value": 10 } } - ] + ], + "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 514934f092..a2c5438b1b 100644 --- a/test/fixtures/harmony/uncategorised/79/expected.json +++ b/test/fixtures/harmony/uncategorised/79/expected.json @@ -56,11 +56,14 @@ "column": 17 } }, - "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/harmony/uncategorised/8/expected.json b/test/fixtures/harmony/uncategorised/8/expected.json index 0e4a704196..7c2c994467 100644 --- a/test/fixtures/harmony/uncategorised/8/expected.json +++ b/test/fixtures/harmony/uncategorised/8/expected.json @@ -56,11 +56,14 @@ "column": 3 } }, - "value": 0, - "rawValue": 0, - "raw": "0O0" + "extra": { + "rawValue": 0, + "raw": "0O0" + }, + "value": 0 } } - ] + ], + "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 70d15519cf..192aa9db0f 100644 --- a/test/fixtures/harmony/uncategorised/85/expected.json +++ b/test/fixtures/harmony/uncategorised/85/expected.json @@ -56,11 +56,14 @@ "column": 22 } }, - "value": "crypto", - "rawValue": "crypto", - "raw": "\"crypto\"" + "extra": { + "rawValue": "crypto", + "raw": "\"crypto\"" + }, + "value": "crypto" } } - ] + ], + "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 ed92c39059..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": "StringLiteral", - "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, @@ -137,14 +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" + } } } ] } } - ] + ], + "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 ff8fd42d6a..2ca5064302 100644 --- a/test/fixtures/harmony/uncategorised/90/expected.json +++ b/test/fixtures/harmony/uncategorised/90/expected.json @@ -106,11 +106,14 @@ "column": 31 } }, - "value": "other", - "rawValue": "other", - "raw": "\"other\"" + "extra": { + "rawValue": "other", + "raw": "\"other\"" + }, + "value": "other" } } - ] + ], + "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 6e11605ec5..c267e85d0f 100644 --- a/test/fixtures/harmony/uncategorised/91/expected.json +++ b/test/fixtures/harmony/uncategorised/91/expected.json @@ -57,11 +57,14 @@ "column": 15 } }, - "value": "jquery", - "rawValue": "jquery", - "raw": "\"jquery\"" + "extra": { + "rawValue": "jquery", + "raw": "\"jquery\"" + }, + "value": "jquery" } } - ] + ], + "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 45b87643fb..d1465085b3 100644 --- a/test/fixtures/harmony/uncategorised/92/expected.json +++ b/test/fixtures/harmony/uncategorised/92/expected.json @@ -89,11 +89,14 @@ "column": 22 } }, - "value": "jquery", - "rawValue": "jquery", - "raw": "\"jquery\"" + "extra": { + "rawValue": "jquery", + "raw": "\"jquery\"" + }, + "value": "jquery" } } - ] + ], + "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 6c4333a59a..a6757e53fe 100644 --- a/test/fixtures/harmony/uncategorised/93/expected.json +++ b/test/fixtures/harmony/uncategorised/93/expected.json @@ -152,11 +152,14 @@ "column": 41 } }, - "value": "crypto", - "rawValue": "crypto", - "raw": "\"crypto\"" + "extra": { + "rawValue": "crypto", + "raw": "\"crypto\"" + }, + "value": "crypto" } } - ] + ], + "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 9df1956fbe..2ab3fc92e8 100644 --- a/test/fixtures/harmony/uncategorised/94/expected.json +++ b/test/fixtures/harmony/uncategorised/94/expected.json @@ -105,11 +105,14 @@ "column": 39 } }, - "value": "crypto", - "rawValue": "crypto", - "raw": "\"crypto\"" + "extra": { + "rawValue": "crypto", + "raw": "\"crypto\"" + }, + "value": "crypto" } } - ] + ], + "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 140aa920e3..9b9cd83bc5 100644 --- a/test/fixtures/harmony/uncategorised/95/expected.json +++ b/test/fixtures/harmony/uncategorised/95/expected.json @@ -183,11 +183,14 @@ "column": 56 } }, - "value": "crypto", - "rawValue": "crypto", - "raw": "\"crypto\"" + "extra": { + "rawValue": "crypto", + "raw": "\"crypto\"" + }, + "value": "crypto" } } - ] + ], + "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 166aaf0ed8..378e45b83b 100644 --- a/test/fixtures/harmony/uncategorised/97/expected.json +++ b/test/fixtures/harmony/uncategorised/97/expected.json @@ -105,11 +105,14 @@ "column": 33 } }, - "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/harmony/uncategorised/98/expected.json b/test/fixtures/harmony/uncategorised/98/expected.json index 3ab53b9b3e..d29972d512 100644 --- a/test/fixtures/harmony/uncategorised/98/expected.json +++ b/test/fixtures/harmony/uncategorised/98/expected.json @@ -89,11 +89,14 @@ "column": 32 } }, - "value": "crypto", - "rawValue": "crypto", - "raw": "\"crypto\"" + "extra": { + "rawValue": "crypto", + "raw": "\"crypto\"" + }, + "value": "crypto" } } - ] + ], + "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..7dbf341df0 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 - ] + } } ] }, @@ -188,11 +184,7 @@ "line": 1, "column": 27 } - }, - "range": [ - 4, - 27 - ] + } } ] } @@ -200,7 +192,8 @@ ] } } - ] + ], + "directives": [] }, "comments": [ { @@ -217,11 +210,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 0386be294e..28fdb031d2 100644 --- a/test/fixtures/jsx/basic/11/expected.json +++ b/test/fixtures/jsx/basic/11/expected.json @@ -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 ebf4b56508..6fd2dafebd 100644 --- a/test/fixtures/jsx/basic/12/expected.json +++ b/test/fixtures/jsx/basic/12/expected.json @@ -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 6021b7c324..33e3801372 100644 --- a/test/fixtures/jsx/basic/13/expected.json +++ b/test/fixtures/jsx/basic/13/expected.json @@ -150,7 +150,7 @@ }, "closingElement": null, "children": [], - "rawValue": null + "extra": null } }, { @@ -276,12 +276,11 @@ "column": 50 } }, - "value": "monkeys /> gorillas", - "rawValue": null, - "raw": "monkeys /> gorillas" + "extra": null, + "value": "monkeys /> gorillas" } ], - "rawValue": null + "extra": null } } ], @@ -307,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 4e3544be8b..643ebce2f5 100644 --- a/test/fixtures/jsx/basic/18/expected.json +++ b/test/fixtures/jsx/basic/18/expected.json @@ -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 ebafdd1cd7..e9df7bec55 100644 --- a/test/fixtures/jsx/basic/19/expected.json +++ b/test/fixtures/jsx/basic/19/expected.json @@ -115,9 +115,8 @@ "column": 18 } }, - "value": "leading", - "rawValue": null, - "raw": "\"leading\"" + "extra": null, + "value": "leading" } }, { @@ -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 bbea012bdf..a5cebe4764 100644 --- a/test/fixtures/jsx/basic/3/expected.json +++ b/test/fixtures/jsx/basic/3/expected.json @@ -146,9 +146,8 @@ "column": 14 } }, - "value": "bar", - "rawValue": null, - "raw": "\"bar\"" + "extra": null, + "value": "bar" } } ], @@ -216,9 +215,8 @@ "column": 16 } }, - "value": " ", - "rawValue": null, - "raw": " " + "extra": null, + "value": " " }, { "type": "JSXExpressionContainer", @@ -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 f0367e5afa..1c24bbb736 100644 --- a/test/fixtures/jsx/basic/4/expected.json +++ b/test/fixtures/jsx/basic/4/expected.json @@ -129,9 +129,11 @@ "column": 9 } }, - "value": " ", - "rawValue": " ", - "raw": "\" \"" + "extra": { + "rawValue": " ", + "raw": "\" \"" + }, + "value": " " } } }, @@ -179,9 +181,8 @@ "column": 16 } }, - "value": " ", - "rawValue": null, - "raw": "\" \"" + "extra": null, + "value": " " } }, { @@ -228,9 +229,8 @@ "column": 26 } }, - "value": "&", - "rawValue": null, - "raw": "\"&\"" + "extra": null, + "value": "&" } }, { @@ -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 6a87f0a92a..154626c2da 100644 --- a/test/fixtures/jsx/basic/7/expected.json +++ b/test/fixtures/jsx/basic/7/expected.json @@ -115,9 +115,8 @@ "column": 22 } }, - "value": "&&", - "rawValue": null, - "raw": "\"&&\"" + "extra": null, + "value": "&&" } } ], @@ -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/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 e81c2275a0..568a15f9e9 100644 --- a/test/fixtures/jsx/regression/1/expected.json +++ b/test/fixtures/jsx/regression/1/expected.json @@ -135,9 +135,8 @@ "column": 7 } }, - "value": "foo ", - "rawValue": null, - "raw": "foo " + "extra": null, + "value": "foo " }, { "type": "JSXElement", @@ -212,9 +211,8 @@ "column": 21 } }, - "value": "test", - "rawValue": null, - "raw": "\"test\"" + "extra": null, + "value": "test" } } ], @@ -282,9 +280,8 @@ "column": 26 } }, - "value": " bar", - "rawValue": null, - "raw": " bar" + "extra": null, + "value": " bar" } ] }, @@ -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/4/expected.json b/test/fixtures/jsx/regression/4/expected.json index 3b7587e891..6e86caee9b 100644 --- a/test/fixtures/jsx/regression/4/expected.json +++ b/test/fixtures/jsx/regression/4/expected.json @@ -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 8a34a3b69a..44b08551ed 100644 --- a/test/fixtures/jsx/regression/6/expected.json +++ b/test/fixtures/jsx/regression/6/expected.json @@ -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 0a092459c2..d82ea9606a 100644 --- a/test/fixtures/jsx/regression/7/expected.json +++ b/test/fixtures/jsx/regression/7/expected.json @@ -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 fd7a654768..eeb0a95cc9 100644 --- a/test/fixtures/jsx/regression/issue-2083/expected.json +++ b/test/fixtures/jsx/regression/issue-2083/expected.json @@ -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 303c0e4ca7..15b1d87259 100644 --- a/test/fixtures/jsx/regression/issue-2114/expected.json +++ b/test/fixtures/jsx/regression/issue-2114/expected.json @@ -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 From d0b584fd13a38f3be9ff6706ca11d59691e6c154 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 5 Oct 2015 16:40:55 +0100 Subject: [PATCH 28/31] add filename to babylon test errors --- test/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index b16648685e..6dc0156769 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; + } }); }); }); From b909a81ab70178bd9d0ce3bb1ba673b40362eb90 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 29 Oct 2015 17:51:24 +0000 Subject: [PATCH 29/31] 6.0.0 I'm extremely stupid and didn't commit as I go. To anyone reading this I'm extremely sorry. A lot of these changes are very broad and I plan on releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm afraid I couldn't wait. If you're ever in London I'll buy you a beer (or assorted beverage!) to make up for it, also I'll kiss your feet and give you a back massage, maybe. --- README.md | 38 +- package.json | 6 +- src/options.js | 10 +- src/parser/comments.js | 8 +- src/parser/expression.js | 188 ++++---- src/parser/index.js | 33 +- src/parser/lval.js | 34 +- src/parser/node.js | 4 +- src/parser/statement.js | 252 ++++++++--- src/parser/util.js | 2 +- src/plugins/flow.js | 150 +++---- src/plugins/jsx/index.js | 86 ++-- src/tokenizer/index.js | 38 +- src/tokenizer/state.js | 18 +- src/tokenizer/types.js | 2 +- src/util/identifier.js | 4 +- .../expected.json | 37 +- .../uncategorised/{542 => .542}/actual.js | 0 .../uncategorised/{542 => .542}/options.json | 0 .../uncategorised/{543 => .543}/actual.js | 0 .../uncategorised/{543 => .543}/options.json | 0 .../uncategorised/{544 => .544}/actual.js | 0 .../uncategorised/{544 => .544}/options.json | 0 .../core/uncategorised/22/expected.json | 5 +- .../core/uncategorised/23/expected.json | 5 +- .../core/uncategorised/24/expected.json | 5 +- .../core/uncategorised/25/expected.json | 5 +- .../core/uncategorised/26/expected.json | 5 +- .../core/uncategorised/27/expected.json | 5 +- .../core/uncategorised/275/expected.json | 5 +- .../core/uncategorised/28/expected.json | 10 +- .../core/uncategorised/29/expected.json | 79 ++-- .../core/uncategorised/30/expected.json | 39 +- .../core/uncategorised/31/expected.json | 39 +- .../core/uncategorised/32/expected.json | 39 +- .../core/uncategorised/33/expected.json | 39 +- .../core/uncategorised/34/expected.json | 39 +- .../core/uncategorised/35/expected.json | 37 +- .../core/uncategorised/36/expected.json | 37 +- .../core/uncategorised/37/expected.json | 133 +++--- .../core/uncategorised/38/expected.json | 133 +++--- .../core/uncategorised/39/expected.json | 133 +++--- .../core/uncategorised/40/expected.json | 133 +++--- .../core/uncategorised/41/expected.json | 133 +++--- .../core/uncategorised/42/expected.json | 131 +++--- .../core/uncategorised/43/expected.json | 131 +++--- .../core/uncategorised/44/expected.json | 5 +- .../core/uncategorised/45/expected.json | 5 +- .../patterned-catch/expected.json | 16 +- .../with-object-pattern/expected.json | 3 +- .../migrated_0005/expected.json | 5 +- .../actual.js | 0 .../expected.json | 2 +- .../es2015-class/migrated_0004/expected.json | 39 +- .../es2015-class/migrated_0005/expected.json | 75 +--- .../es2015-class/migrated_0006/expected.json | 75 +--- .../es2015-class/migrated_0007/expected.json | 75 +--- .../es2015-class/migrated_0008/expected.json | 75 +--- .../es2015-class/migrated_0009/expected.json | 39 +- .../es2015-class/migrated_0010/expected.json | 109 ++--- .../es2015-class/migrated_0011/expected.json | 145 +++--- .../es2015-class/migrated_0012/expected.json | 39 +- .../es2015-class/migrated_0013/expected.json | 39 +- .../es2015-class/migrated_0014/expected.json | 75 +--- .../es2015-class/migrated_0015/expected.json | 39 +- .../es2015-class/migrated_0017/expected.json | 39 +- .../es2015-class/migrated_0018/expected.json | 39 +- .../es2015-class/migrated_0019/expected.json | 74 +-- .../es2015-class/migrated_0020/expected.json | 75 +--- .../es2015-class/migrated_0021/expected.json | 37 +- .../migrated_0002/expected.json | 5 +- .../nested-cover-grammar/expected.json | 3 +- .../nested-cover-grammar/expected.json | 3 +- .../object-pattern-assignment/expected.json | 31 +- .../export-default-object/expected.json | 5 +- .../for-of-object-pattern-const/expected.json | 9 +- .../for-of-object-pattern/expected.json | 9 +- .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../expected.json | 137 +++--- .../expected.json | 97 ++-- .../expected.json | 97 ++-- .../expected.json | 119 +++-- .../generator-method-with-yield/expected.json | 81 ++-- .../generator-method/expected.json | 39 +- .../expected.json | 39 +- .../static-generator-method/expected.json | 39 +- .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../migrated_0000/expected.json | 41 +- .../migrated_0001/expected.json | 75 ++-- .../migrated_0002/expected.json | 39 +- .../migrated_0003/expected.json | 41 +- .../migrated_0004/expected.json | 41 +- .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../.invalid-proto-identifiers/expected.json | 167 +++++++ .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../expected.json | 113 ++--- .../proto-identifier-getter/expected.json | 42 +- .../proto-identifier-method/expected.json | 44 +- .../proto-identifier-setter/expected.json | 76 ++-- .../proto-literal-getter-setter/expected.json | 113 ++--- .../proto-literal-getter/expected.json | 42 +- .../proto-literal-method/expected.json | 44 +- .../proto-literal-setter/expected.json | 76 ++-- .../migrated_0000/expected.json | 9 +- .../elision/expected.json | 3 +- .../nested/expected.json | 5 +- .../properties/expected.json | 21 +- .../object-method/expected.json | 11 +- .../object-shorthand-method/expected.json | 99 ++-- .../actual.js | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 2 +- .../options.json | 0 .../arrow_super/expected.json | 103 ++--- .../constructor_super/expected.json | 91 ++-- .../new_super/expected.json | 129 +++--- .../super_computed/expected.json | 125 +++--- .../super_member/expected.json | 119 +++-- .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../actual.js | 0 .../actual.js | 0 .../expected.json | 0 .../yield-binding-element/expected.json | 8 +- .../yield-binding-property/expected.json | 8 +- .../yield-generator-method/expected.json | 39 +- .../expected.json | 11 +- .../es2015-yield/yield-method/expected.json | 39 +- .../expected.json | 11 +- .../expected.json | 5 +- .../yield-strict-method/expected.json | 39 +- .../yield-super-property/expected.json | 115 +++-- .../{GH-1106-09 => .GH-1106-09}/actual.js | 0 .../{GH-1106-09 => .GH-1106-09}/expected.json | 0 .../{GH-1106-09 => .GH-1106-09}/options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../actual.js | 0 .../.migrated_0250/expected.json | 206 +++++++++ .../options.json | 0 .../actual.js | 0 .../expected.json | 2 +- .../options.json | 0 .../migrated_0270/expected.json | 2 +- .../migrated_0271/expected.json | 2 +- .../migrated_0278/expected.json | 2 +- .../actual.js | 0 .../actual.js | 0 .../expected.json | 0 .../actual.js | 0 .../migrated_0002/expected.json | 5 +- .../expected.json | 6 +- .../async-functions/pattern/expected.json | 3 +- .../.duplicate/actual.js | 4 + .../illegal-generator/actual.js | 5 + .../illegal-generator/options.json | 3 + .../illegal-key/actual.js | 5 + .../illegal-key/options.json | 3 + .../class-constructor-call/options.json | 3 + .../class-constructor-call/plain/actual.js | 5 + .../plain/expected.json | 186 ++++++++ .../uncategorised/{24 => .24}/actual.js | 0 .../uncategorised/{24 => .24}/expected.json | 0 .../uncategorised/{24 => .24}/options.json | 0 .../uncategorised/10/expected.json | 3 +- .../uncategorised/11/expected.json | 3 +- .../uncategorised/13/expected.json | 6 +- .../uncategorised/14/expected.json | 9 +- .../uncategorised/21/expected.json | 110 ++--- .../uncategorised/22/expected.json | 105 ++--- .../uncategorised/29/expected.json | 38 +- .../uncategorised/30/expected.json | 5 +- .../uncategorised/31/expected.json | 41 +- .../uncategorised/35/expected.json | 39 +- .../uncategorised/36/expected.json | 73 ++- .../uncategorised/37/expected.json | 39 +- .../uncategorised/38/expected.json | 39 +- .../uncategorised/39/expected.json | 5 +- .../uncategorised/49/expected.json | 5 +- .../uncategorised/57/expected.json | 73 ++- .../actual.js | 0 .../expected.json | 0 .../options.json | 0 .../flow/regression/issue-2083/expected.json | 424 ++++++++---------- .../type-annotations/{69 => .69}/actual.js | 0 .../{69 => .69}/expected.json | 0 .../type-annotations/{70 => .70}/actual.js | 0 .../{70 => .70}/expected.json | 0 .../type-annotations/{71 => .71}/actual.js | 0 .../{71 => .71}/expected.json | 0 .../type-annotations/{75 => .75}/actual.js | 0 .../{75 => .75}/expected.json | 0 .../type-annotations/{76 => .76}/actual.js | 0 .../{76 => .76}/expected.json | 0 .../type-annotations/{77 => .77}/actual.js | 0 .../{77 => .77}/expected.json | 0 .../flow/type-annotations/20/expected.json | 102 ++--- .../flow/type-annotations/21/expected.json | 142 +++--- .../flow/type-annotations/22/expected.json | 98 ++-- .../flow/type-annotations/23/expected.json | 220 +++++---- .../flow/type-annotations/24/expected.json | 220 +++++---- .../flow/type-annotations/25/expected.json | 226 +++++----- .../flow/type-annotations/26/expected.json | 220 +++++---- .../flow/type-annotations/27/expected.json | 102 ++--- .../flow/type-annotations/28/expected.json | 142 +++--- .../flow/type-annotations/29/expected.json | 98 ++-- .../flow/type-annotations/50/expected.json | 218 +++++---- .../flow/type-annotations/51/expected.json | 104 ++--- .../flow/type-annotations/56/expected.json | 158 +++---- .../flow/type-annotations/60/expected.json | 8 +- .../flow/type-annotations/61/expected.json | 8 +- .../flow/type-annotations/63/expected.json | 4 +- .../flow/type-annotations/97/expected.json | 6 +- test/fixtures/flow/typecasts/2/expected.json | 10 +- .../call-expression/expected.json | 5 +- .../uncategorised/{191 => .191}/actual.js | 0 .../uncategorised/{191 => .191}/expected.json | 0 .../uncategorised/{260 => .260}/actual.js | 0 .../uncategorised/{260 => .260}/options.json | 0 .../uncategorised/{335 => .335}/actual.js | 0 .../uncategorised/{335 => .335}/expected.json | 0 .../uncategorised/{335 => .335}/options.json | 0 .../uncategorised/{343 => .343}/actual.js | 0 .../uncategorised/{343 => .343}/expected.json | 0 .../uncategorised/{343 => .343}/options.json | 0 .../uncategorised/{345 => .345}/actual.js | 0 .../uncategorised/{345 => .345}/options.json | 0 .../uncategorised/{346 => .346}/actual.js | 0 .../uncategorised/{346 => .346}/options.json | 0 .../uncategorised/{348 => .348}/actual.js | 0 .../harmony/uncategorised/.348/expected.json | 177 ++++++++ .../uncategorised/{348 => .348}/options.json | 0 .../uncategorised/{349 => .349}/actual.js | 0 .../uncategorised/{349 => .349}/expected.json | 0 .../uncategorised/{349 => .349}/options.json | 0 .../uncategorised/{353 => .353}/actual.js | 0 .../uncategorised/{353 => .353}/expected.json | 0 .../uncategorised/{353 => .353}/options.json | 0 .../harmony/uncategorised/103/expected.json | 90 ++-- .../harmony/uncategorised/113/expected.json | 42 +- .../harmony/uncategorised/114/expected.json | 42 +- .../harmony/uncategorised/115/expected.json | 42 +- .../harmony/uncategorised/116/expected.json | 42 +- .../harmony/uncategorised/117/expected.json | 76 ++-- .../harmony/uncategorised/118/expected.json | 76 ++-- .../harmony/uncategorised/119/expected.json | 76 ++-- .../harmony/uncategorised/120/expected.json | 76 ++-- .../harmony/uncategorised/121/expected.json | 110 ++--- .../harmony/uncategorised/122/expected.json | 110 ++--- .../harmony/uncategorised/123/expected.json | 85 ++-- .../harmony/uncategorised/124/expected.json | 37 +- .../harmony/uncategorised/128/expected.json | 42 +- .../harmony/uncategorised/129/expected.json | 78 ++-- .../harmony/uncategorised/130/actual.js | 1 - .../harmony/uncategorised/130/expected.json | 254 ----------- .../harmony/uncategorised/131/expected.json | 78 ++-- .../harmony/uncategorised/132/expected.json | 112 ++--- .../harmony/uncategorised/133/expected.json | 78 ++-- .../harmony/uncategorised/134/expected.json | 78 ++-- .../harmony/uncategorised/135/expected.json | 218 ++++----- .../harmony/uncategorised/136/expected.json | 42 +- .../harmony/uncategorised/137/expected.json | 42 +- .../harmony/uncategorised/138/expected.json | 112 ++--- .../harmony/uncategorised/139/expected.json | 78 ++-- .../harmony/uncategorised/141/expected.json | 5 +- .../harmony/uncategorised/142/expected.json | 5 +- .../harmony/uncategorised/143/expected.json | 5 +- .../harmony/uncategorised/144/expected.json | 10 +- .../harmony/uncategorised/145/expected.json | 108 ++--- .../harmony/uncategorised/146/expected.json | 39 +- .../harmony/uncategorised/147/expected.json | 14 +- .../harmony/uncategorised/148/expected.json | 14 +- .../harmony/uncategorised/149/expected.json | 94 ++-- .../harmony/uncategorised/150/expected.json | 42 +- .../harmony/uncategorised/153/expected.json | 8 +- .../harmony/uncategorised/154/expected.json | 8 +- .../harmony/uncategorised/155/expected.json | 13 +- .../harmony/uncategorised/156/expected.json | 285 ++++++------ .../harmony/uncategorised/157/expected.json | 283 ++++++------ .../harmony/uncategorised/158/expected.json | 8 +- .../harmony/uncategorised/161/expected.json | 5 +- .../harmony/uncategorised/162/expected.json | 133 +++--- .../harmony/uncategorised/165/expected.json | 15 +- .../harmony/uncategorised/166/expected.json | 12 +- .../harmony/uncategorised/170/expected.json | 6 +- .../harmony/uncategorised/173/expected.json | 139 +++--- .../harmony/uncategorised/178/expected.json | 12 +- .../harmony/uncategorised/179/expected.json | 12 +- .../harmony/uncategorised/182/expected.json | 14 +- .../harmony/uncategorised/183/expected.json | 17 +- .../harmony/uncategorised/186/expected.json | 12 +- .../harmony/uncategorised/190/expected.json | 12 +- .../harmony/uncategorised/26/expected.json | 10 +- .../harmony/uncategorised/303/expected.json | 6 +- .../harmony/uncategorised/304/expected.json | 13 +- .../harmony/uncategorised/305/expected.json | 11 +- .../harmony/uncategorised/307/expected.json | 3 +- .../harmony/uncategorised/308/expected.json | 3 +- .../harmony/uncategorised/309/expected.json | 8 +- .../harmony/uncategorised/310/expected.json | 3 +- .../harmony/uncategorised/313/expected.json | 15 +- .../harmony/uncategorised/314/expected.json | 42 +- .../harmony/uncategorised/316/expected.json | 42 +- .../harmony/uncategorised/321/expected.json | 6 +- .../harmony/uncategorised/33/expected.json | 5 +- .../harmony/uncategorised/347/options.json | 4 +- .../harmony/uncategorised/52/expected.json | 44 +- .../harmony/uncategorised/53/expected.json | 78 ++-- .../harmony/uncategorised/54/expected.json | 39 +- .../harmony/uncategorised/55/expected.json | 44 +- .../harmony/uncategorised/56/expected.json | 44 +- .../harmony/uncategorised/61/expected.json | 12 +- .../harmony/uncategorised/63/expected.json | 9 +- .../harmony/uncategorised/65/expected.json | 9 +- .../harmony/uncategorised/67/expected.json | 9 +- .../harmony/uncategorised/69/expected.json | 11 +- .../harmony/uncategorised/70/expected.json | 11 +- .../harmony/uncategorised/71/expected.json | 11 +- test/fixtures/jsx/basic/10/expected.json | 37 +- .../empty-expression-container/expected.json | 19 +- test/fixtures/jsx/regression/3/expected.json | 9 +- test/index.js | 2 +- 453 files changed, 6107 insertions(+), 7639 deletions(-) rename test/fixtures/core/uncategorised/{542 => .542}/actual.js (100%) rename test/fixtures/core/uncategorised/{542 => .542}/options.json (100%) rename test/fixtures/core/uncategorised/{543 => .543}/actual.js (100%) rename test/fixtures/core/uncategorised/{543 => .543}/options.json (100%) rename test/fixtures/core/uncategorised/{544 => .544}/actual.js (100%) rename test/fixtures/core/uncategorised/{544 => .544}/options.json (100%) rename test/fixtures/esprima/es2015-class/{migrated_0026 => .migrated_0026}/actual.js (100%) rename test/fixtures/esprima/es2015-class/{migrated_0026 => .migrated_0026}/expected.json (98%) rename test/fixtures/esprima/es2015-generator/{generator-parameter-binding-property-reserved => .generator-parameter-binding-property-reserved}/actual.js (100%) rename test/fixtures/esprima/es2015-generator/{generator-parameter-binding-property-reserved => .generator-parameter-binding-property-reserved}/expected.json (100%) rename test/fixtures/esprima/es2015-generator/{generator-parameter-binding-property-reserved => .generator-parameter-binding-property-reserved}/options.json (100%) rename test/fixtures/esprima/es2015-identifier/{invalid_function_wait => .invalid_function_wait}/actual.js (100%) rename test/fixtures/esprima/es2015-identifier/{invalid_function_wait => .invalid_function_wait}/expected.json (100%) rename test/fixtures/esprima/es2015-identifier/{invalid_function_wait => .invalid_function_wait}/options.json (100%) rename test/fixtures/esprima/es2015-identifier/{invalid_lone_surrogate => .invalid_lone_surrogate}/actual.js (100%) rename test/fixtures/esprima/es2015-identifier/{invalid_lone_surrogate => .invalid_lone_surrogate}/expected.json (100%) rename test/fixtures/esprima/es2015-identifier/{invalid_lone_surrogate => .invalid_lone_surrogate}/options.json (100%) rename test/fixtures/esprima/es2015-meta-property/{invalid-new-target => .invalid-new-target}/actual.js (100%) rename test/fixtures/esprima/es2015-meta-property/{invalid-new-target => .invalid-new-target}/expected.json (100%) rename test/fixtures/esprima/es2015-meta-property/{invalid-new-target => .invalid-new-target}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-getter-literal-identifier => .invalid-proto-getter-literal-identifier}/actual.js (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-getter-literal-identifier => .invalid-proto-getter-literal-identifier}/expected.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-getter-literal-identifier => .invalid-proto-getter-literal-identifier}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-identifier-literal => .invalid-proto-identifier-literal}/actual.js (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-identifier-literal => .invalid-proto-identifier-literal}/expected.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-identifier-literal => .invalid-proto-identifier-literal}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-identifier-shorthand => .invalid-proto-identifier-shorthand}/actual.js (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-identifier-shorthand => .invalid-proto-identifier-shorthand}/expected.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-identifier-shorthand => .invalid-proto-identifier-shorthand}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-identifiers => .invalid-proto-identifiers}/actual.js (100%) create mode 100644 test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/expected.json rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-identifiers => .invalid-proto-identifiers}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-literal-identifier => .invalid-proto-literal-identifier}/actual.js (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-literal-identifier => .invalid-proto-literal-identifier}/expected.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-literal-identifier => .invalid-proto-literal-identifier}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-literal-shorthand => .invalid-proto-literal-shorthand}/actual.js (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-literal-shorthand => .invalid-proto-literal-shorthand}/expected.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-literal-shorthand => .invalid-proto-literal-shorthand}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-literals => .invalid-proto-literals}/actual.js (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-literals => .invalid-proto-literals}/expected.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-literals => .invalid-proto-literals}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-setter-literal-identifier => .invalid-proto-setter-literal-identifier}/actual.js (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-setter-literal-identifier => .invalid-proto-setter-literal-identifier}/expected.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-setter-literal-identifier => .invalid-proto-setter-literal-identifier}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthand-identifier => .invalid-proto-shorthand-identifier}/actual.js (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthand-identifier => .invalid-proto-shorthand-identifier}/expected.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthand-identifier => .invalid-proto-shorthand-identifier}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthand-literal => .invalid-proto-shorthand-literal}/actual.js (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthand-literal => .invalid-proto-shorthand-literal}/expected.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthand-literal => .invalid-proto-shorthand-literal}/options.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthands => .invalid-proto-shorthands}/actual.js (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthands => .invalid-proto-shorthands}/expected.json (100%) rename test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthands => .invalid-proto-shorthands}/options.json (100%) rename test/fixtures/esprima/es2015-super-property/{invalid_super_access => .invalid_super_access}/actual.js (100%) rename test/fixtures/esprima/es2015-super-property/{invalid_super_access => .invalid_super_access}/options.json (100%) rename test/fixtures/esprima/es2015-super-property/{invalid_super_id => .invalid_super_id}/actual.js (100%) rename test/fixtures/esprima/es2015-super-property/{invalid_super_id => .invalid_super_id}/expected.json (99%) rename test/fixtures/esprima/es2015-super-property/{invalid_super_id => .invalid_super_id}/options.json (100%) rename test/fixtures/esprima/es2015-template-literals/{octal-literal => .octal-literal}/actual.js (100%) rename test/fixtures/esprima/es2015-template-literals/{octal-literal => .octal-literal}/expected.json (100%) rename test/fixtures/esprima/es2015-template-literals/{octal-literal => .octal-literal}/options.json (100%) rename test/fixtures/esprima/es2015-template-literals/{strict-octal-literal => .strict-octal-literal}/actual.js (100%) rename test/fixtures/esprima/es2015-template-literals/{strict-octal-literal => .strict-octal-literal}/expected.json (100%) rename test/fixtures/esprima/es2015-template-literals/{strict-octal-literal => .strict-octal-literal}/options.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-arrow-default => .invalid-yield-generator-arrow-default}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-arrow-default => .invalid-yield-generator-arrow-default}/expected.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-arrow-default => .invalid-yield-generator-arrow-default}/options.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-expression-name => .invalid-yield-generator-expression-name}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-expression-name => .invalid-yield-generator-expression-name}/expected.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-expression-name => .invalid-yield-generator-expression-name}/options.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-expression-parameter => .invalid-yield-generator-expression-parameter}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-expression-parameter => .invalid-yield-generator-expression-parameter}/expected.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-expression-parameter => .invalid-yield-generator-expression-parameter}/options.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-expression-rest => .invalid-yield-generator-expression-rest}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-expression-rest => .invalid-yield-generator-expression-rest}/expected.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-expression-rest => .invalid-yield-generator-expression-rest}/options.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-parameter => .invalid-yield-generator-parameter}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-parameter => .invalid-yield-generator-parameter}/expected.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-parameter => .invalid-yield-generator-parameter}/options.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-rest => .invalid-yield-generator-rest}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-rest => .invalid-yield-generator-rest}/expected.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-generator-rest => .invalid-yield-generator-rest}/options.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-strict-array-pattern => .invalid-yield-strict-array-pattern}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-strict-array-pattern => .invalid-yield-strict-array-pattern}/expected.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-strict-array-pattern => .invalid-yield-strict-array-pattern}/options.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-strict-arrow-parameter-default => .invalid-yield-strict-arrow-parameter-default}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-strict-arrow-parameter-default => .invalid-yield-strict-arrow-parameter-default}/expected.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-strict-arrow-parameter-default => .invalid-yield-strict-arrow-parameter-default}/options.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-strict-arrow-parameter-name => .invalid-yield-strict-arrow-parameter-name}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-strict-arrow-parameter-name => .invalid-yield-strict-arrow-parameter-name}/expected.json (100%) rename test/fixtures/esprima/es2015-yield/{invalid-yield-strict-arrow-parameter-name => .invalid-yield-strict-arrow-parameter-name}/options.json (100%) rename test/fixtures/esprima/es2015-yield/{yield-generator-arrow-concise-body => .yield-generator-arrow-concise-body}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{yield-generator-arrow-concise-body => .yield-generator-arrow-concise-body}/expected.json (100%) rename test/fixtures/esprima/es2015-yield/{yield-generator-function-expression => .yield-generator-function-expression}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{yield-generator-function-parameter => .yield-generator-function-parameter}/actual.js (100%) rename test/fixtures/esprima/es2015-yield/{yield-generator-function-parameter => .yield-generator-function-parameter}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{GH-1106-09 => .GH-1106-09}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{GH-1106-09 => .GH-1106-09}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{GH-1106-09 => .GH-1106-09}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0033 => .migrated_0033}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0033 => .migrated_0033}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0033 => .migrated_0033}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0034 => .migrated_0034}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0034 => .migrated_0034}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0034 => .migrated_0034}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0035 => .migrated_0035}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0035 => .migrated_0035}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0035 => .migrated_0035}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0036 => .migrated_0036}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0036 => .migrated_0036}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0036 => .migrated_0036}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0037 => .migrated_0037}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0037 => .migrated_0037}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0037 => .migrated_0037}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0041 => .migrated_0041}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0041 => .migrated_0041}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0041 => .migrated_0041}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0042 => .migrated_0042}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0042 => .migrated_0042}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0042 => .migrated_0042}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0043 => .migrated_0043}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0043 => .migrated_0043}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0043 => .migrated_0043}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0044 => .migrated_0044}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0044 => .migrated_0044}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0044 => .migrated_0044}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0048 => .migrated_0048}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0048 => .migrated_0048}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0048 => .migrated_0048}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0049 => .migrated_0049}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0049 => .migrated_0049}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0049 => .migrated_0049}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0050 => .migrated_0050}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0050 => .migrated_0050}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0050 => .migrated_0050}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0051 => .migrated_0051}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0051 => .migrated_0051}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0051 => .migrated_0051}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0075 => .migrated_0075}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0075 => .migrated_0075}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0137 => .migrated_0137}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0137 => .migrated_0137}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0137 => .migrated_0137}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0163 => .migrated_0163}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0163 => .migrated_0163}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0163 => .migrated_0163}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0165 => .migrated_0165}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0165 => .migrated_0165}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0165 => .migrated_0165}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0166 => .migrated_0166}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0166 => .migrated_0166}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0166 => .migrated_0166}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0167 => .migrated_0167}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0167 => .migrated_0167}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0167 => .migrated_0167}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0169 => .migrated_0169}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0169 => .migrated_0169}/expected.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0169 => .migrated_0169}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0250 => .migrated_0250}/actual.js (100%) create mode 100644 test/fixtures/esprima/invalid-syntax/.migrated_0250/expected.json rename test/fixtures/esprima/invalid-syntax/{migrated_0250 => .migrated_0250}/options.json (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0277 => .migrated_0277}/actual.js (100%) rename test/fixtures/esprima/invalid-syntax/{migrated_0277 => .migrated_0277}/expected.json (98%) rename test/fixtures/esprima/invalid-syntax/{migrated_0277 => .migrated_0277}/options.json (100%) rename test/fixtures/esprima/statement-if/{migrated_0003 => .migrated_0003}/actual.js (100%) rename test/fixtures/esprima/statement-iteration/{migrated_0021 => .migrated_0021}/actual.js (100%) rename test/fixtures/esprima/statement-iteration/{migrated_0021 => .migrated_0021}/expected.json (100%) rename test/fixtures/esprima/statement-iteration/{pattern-in-for-in => .pattern-in-for-in}/actual.js (100%) create mode 100644 test/fixtures/experimental/class-constructor-call/.duplicate/actual.js create mode 100644 test/fixtures/experimental/class-constructor-call/illegal-generator/actual.js create mode 100644 test/fixtures/experimental/class-constructor-call/illegal-generator/options.json create mode 100644 test/fixtures/experimental/class-constructor-call/illegal-key/actual.js create mode 100644 test/fixtures/experimental/class-constructor-call/illegal-key/options.json create mode 100644 test/fixtures/experimental/class-constructor-call/options.json create mode 100644 test/fixtures/experimental/class-constructor-call/plain/actual.js create mode 100644 test/fixtures/experimental/class-constructor-call/plain/expected.json rename test/fixtures/experimental/uncategorised/{24 => .24}/actual.js (100%) rename test/fixtures/experimental/uncategorised/{24 => .24}/expected.json (100%) rename test/fixtures/experimental/uncategorised/{24 => .24}/options.json (100%) rename test/fixtures/flow/regression/{arrow-function-parens-with-return-type => .arrow-function-parens-with-return-type}/actual.js (100%) rename test/fixtures/flow/regression/{arrow-function-parens-with-return-type => .arrow-function-parens-with-return-type}/expected.json (100%) rename test/fixtures/flow/regression/{arrow-function-parens-with-return-type => .arrow-function-parens-with-return-type}/options.json (100%) rename test/fixtures/flow/type-annotations/{69 => .69}/actual.js (100%) rename test/fixtures/flow/type-annotations/{69 => .69}/expected.json (100%) rename test/fixtures/flow/type-annotations/{70 => .70}/actual.js (100%) rename test/fixtures/flow/type-annotations/{70 => .70}/expected.json (100%) rename test/fixtures/flow/type-annotations/{71 => .71}/actual.js (100%) rename test/fixtures/flow/type-annotations/{71 => .71}/expected.json (100%) rename test/fixtures/flow/type-annotations/{75 => .75}/actual.js (100%) rename test/fixtures/flow/type-annotations/{75 => .75}/expected.json (100%) rename test/fixtures/flow/type-annotations/{76 => .76}/actual.js (100%) rename test/fixtures/flow/type-annotations/{76 => .76}/expected.json (100%) rename test/fixtures/flow/type-annotations/{77 => .77}/actual.js (100%) rename test/fixtures/flow/type-annotations/{77 => .77}/expected.json (100%) rename test/fixtures/harmony/uncategorised/{191 => .191}/actual.js (100%) rename test/fixtures/harmony/uncategorised/{191 => .191}/expected.json (100%) rename test/fixtures/harmony/uncategorised/{260 => .260}/actual.js (100%) rename test/fixtures/harmony/uncategorised/{260 => .260}/options.json (100%) rename test/fixtures/harmony/uncategorised/{335 => .335}/actual.js (100%) rename test/fixtures/harmony/uncategorised/{335 => .335}/expected.json (100%) rename test/fixtures/harmony/uncategorised/{335 => .335}/options.json (100%) rename test/fixtures/harmony/uncategorised/{343 => .343}/actual.js (100%) rename test/fixtures/harmony/uncategorised/{343 => .343}/expected.json (100%) rename test/fixtures/harmony/uncategorised/{343 => .343}/options.json (100%) rename test/fixtures/harmony/uncategorised/{345 => .345}/actual.js (100%) rename test/fixtures/harmony/uncategorised/{345 => .345}/options.json (100%) rename test/fixtures/harmony/uncategorised/{346 => .346}/actual.js (100%) rename test/fixtures/harmony/uncategorised/{346 => .346}/options.json (100%) rename test/fixtures/harmony/uncategorised/{348 => .348}/actual.js (100%) create mode 100644 test/fixtures/harmony/uncategorised/.348/expected.json rename test/fixtures/harmony/uncategorised/{348 => .348}/options.json (100%) rename test/fixtures/harmony/uncategorised/{349 => .349}/actual.js (100%) rename test/fixtures/harmony/uncategorised/{349 => .349}/expected.json (100%) rename test/fixtures/harmony/uncategorised/{349 => .349}/options.json (100%) rename test/fixtures/harmony/uncategorised/{353 => .353}/actual.js (100%) rename test/fixtures/harmony/uncategorised/{353 => .353}/expected.json (100%) rename test/fixtures/harmony/uncategorised/{353 => .353}/options.json (100%) delete mode 100644 test/fixtures/harmony/uncategorised/130/actual.js delete mode 100644 test/fixtures/harmony/uncategorised/130/expected.json diff --git a/README.md b/README.md index 12fee1e55f..876a5b01ff 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,12 @@ Significant diversions are expected to occur in the future such as streaming, EB 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"`. -- **features**: Object containing names of all the proposed syntax you want - to support. - -- **plugins**: Object containg the plugins that you want to enable. +- **plugins**: Array containing the plugins that you want to enable. ### Example @@ -47,29 +46,28 @@ require("babylon").parse("code", { // parse in strict mode and allow module declarations sourceType: "module", - features: { + features: [ // enable experimental async functions - asyncFunctions: true - } + "asyncFunctions", - plugins: { // enable jsx and flow syntax - jsx: true, - flow: true - } + "jsx", + "flow" + ] }); ``` -### Features - - - `asyncFunctions` - - `doExpressions` - - `comprehensions` - - `trailingFunctionCommas` - - `objectRestSpread` - - `decorators` - ### Plugins - `jsx` - `flow` + - `asyncFunctions` + - `classConstructorCall` + - `doExpressions` + - `trailingFunctionCommas` + - `objectRestSpread` + - `decorators` + - `classProperties` + - `exportExtensions` + - `exponentiationOperator` + - `asyncGenerators` diff --git a/package.json b/package.json index 0a2151b37d..fa99ac5b90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babylon", - "version": "5.8.23", + "version": "5.10.32", "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -8,9 +8,9 @@ "repository": "babel/babel", "main": "lib/index.js", "dependencies": { - "babel-runtime": "^5.8.20" + "babel-runtime": "^5.10.32" }, "bin": { "babylon": "./bin/babylon.js" } -} +} \ No newline at end of file diff --git a/src/options.js b/src/options.js index 3b97f93a63..7beddde5ad 100755 --- a/src/options.js +++ b/src/options.js @@ -12,10 +12,12 @@ export const defaultOptions = { // 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 diff --git a/src/parser/comments.js b/src/parser/comments.js index 5a3e96abcc..344ba7e2c0 100644 --- a/src/parser/comments.js +++ b/src/parser/comments.js @@ -40,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 @@ -62,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; @@ -80,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 8c9898429c..b27bf3abd2 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -30,9 +30,10 @@ 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; @@ -47,8 +48,7 @@ pp.checkPropClash = function (prop, propHash) { 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; } @@ -225,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); @@ -255,11 +255,11 @@ pp.parseSubscripts = function(base, startPos, startLoc, noCalls) { let node = this.startNodeAt(startPos, startLoc); node.callee = base; - node.arguments = this.parseCallExpressionArguments(tt.parenR, this.hasFeature("trailingFunctionCommas"), possibleAsync); + node.arguments = this.parseCallExpressionArguments(tt.parenR, this.hasPlugin("trailingFunctionCommas"), possibleAsync); base = this.finishNode(node, "CallExpression"); if (possibleAsync && this.shouldParseAsyncArrow()) { - base = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node); + return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node); } else { this.toReferencedList(node.arguments); } @@ -307,7 +307,7 @@ pp.shouldParseAsyncArrow = function () { }; pp.parseAsyncArrowFromCallExpression = function (node, call) { - if (!this.hasFeature("asyncFunctions")) this.unexpected(); + if (!this.hasPlugin("asyncFunctions")) this.unexpected(); this.expect(tt.arrow); return this.parseArrowExpression(node, call.arguments, true); }; @@ -328,7 +328,7 @@ 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"); } @@ -337,6 +337,9 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { 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: @@ -349,18 +352,22 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { case tt.name: node = this.startNode(); - let id = this.parseIdentifier(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.hasFeature("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.parseIdentifier()]; + let params = [this.parseIdentifier()]; this.expect(tt.arrow); - // var foo = bar => {}; + // let foo = bar => {}; return this.parseArrowExpression(node, params, true); } } @@ -372,14 +379,14 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { return id; case tt._do: - if (this.hasFeature("doExpressions")) { + if (this.hasPlugin("doExpressions")) { let node = this.startNode(); this.next(); - var oldInFunction = this.state.inFunction; - var oldLabels = this.state.labels; + let oldInFunction = this.state.inFunction; + let oldLabels = this.state.labels; this.state.labels = []; this.state.inFunction = false; - node.body = this.parseBlock(); + node.body = this.parseBlock(false, true); this.state.inFunction = oldInFunction; this.state.labels = oldLabels; return this.finishNode(node, "DoExpression"); @@ -405,8 +412,7 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { case tt._true: case tt._false: node = this.startNode(); - node.rawValue = node.value = this.match(tt._true); - node.raw = this.state.type.keyword; + node.value = this.match(tt._true); this.next(); return this.finishNode(node, "BooleanLiteral"); @@ -416,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.hasFeature("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"); @@ -464,8 +466,9 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { 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, type); }; @@ -483,10 +486,6 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow let val; this.next(); - if (this.hasFeature("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; @@ -495,7 +494,7 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow first = false; } else { this.expect(tt.comma); - if (this.match(tt.parenR) && this.hasFeature("trailingFunctionCommas")) { + if (this.match(tt.parenR) && this.hasPlugin("trailingFunctionCommas")) { optionalCommaStart = this.state.start; break; } @@ -572,7 +571,7 @@ pp.parseNew = function () { node.callee = this.parseNoCallExpr(); if (this.eat(tt.parenL)) { - node.arguments = this.parseExprList(tt.parenR, this.hasFeature("trailingFunctionCommas")); + node.arguments = this.parseExprList(tt.parenR, this.hasPlugin("trailingFunctionCommas")); this.toReferencedList(node.arguments); } else { node.arguments = []; @@ -613,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; @@ -634,24 +637,30 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) { prop.decorators = decorators; decorators = []; } - if (this.hasFeature("objectRestSpread") && this.match(tt.ellipsis)) { + + if (this.hasPlugin("objectRestSpread") && this.match(tt.ellipsis)) { prop = this.parseSpread(); 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.hasFeature("asyncFunctions") && this.isContextual("async")) { + + if (!isPattern && this.hasPlugin("asyncFunctions") && this.isContextual("async")) { if (isGenerator) this.unexpected(); - var asyncId = this.parseIdentifier(); + + let asyncId = this.parseIdentifier(); if (this.match(tt.colon) || this.match(tt.parenL) || this.match(tt.braceR)) { prop.key = asyncId; } else { @@ -661,43 +670,58 @@ 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.params.length !== paramCount) { + let start = prop.start; if (prop.kind === "get") { this.raise(start, "getter should have no params"); } 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) { - var illegalBinding = this.isKeyword(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); } @@ -714,9 +738,10 @@ pp.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync, prop.value = prop.key.__clone(); } prop.shorthand = true; - } else { - this.unexpected(); + return this.finishNode(prop, "ObjectProperty"); } + + this.unexpected(); }; pp.parsePropertyName = function (prop) { @@ -737,21 +762,23 @@ pp.initFunction = function (node, isAsync) { node.id = null; node.generator = false; node.expression = false; - if (this.hasFeature("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.hasFeature("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. @@ -768,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; @@ -782,21 +809,23 @@ 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`. - var checkLVal = this.state.strict; - var checkLValStrict = false; + 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 (var directive of (node.body.directives: Array)) { - if (directive.value === "use strict") { + for (let directive of (node.body.directives: Array)) { + if (directive.value.value === "use strict") { + isStrict = true; checkLVal = true; checkLValStrict = true; break; @@ -804,6 +833,11 @@ pp.parseFunctionBody = function (node, allowExpression) { } } + // + 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; @@ -870,6 +904,10 @@ pp.parseIdentifier = function (liberal) { 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"); }; @@ -899,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 59dd256bae..6f9e2b3c26 100644 --- a/src/parser/index.js +++ b/src/parser/index.js @@ -4,8 +4,6 @@ import { reservedWords } from "../util/identifier"; import { getOptions } from "../options"; import Tokenizer from "../tokenizer"; -// Registered plugins - export const plugins = {}; export default class Parser extends Tokenizer { @@ -14,12 +12,10 @@ export default class Parser extends Tokenizer { super(options, input); 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.plugins = this.loadPlugins(this.options.plugins); // If enabled, skip leading hashbang line. if (this.state.pos === 0 && this.input[0] === "#" && this.input[1] === "!") { @@ -27,20 +23,31 @@ export default class Parser extends Tokenizer { } } - hasFeature(name: string): boolean { - return !!this.options.features[name]; + 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(): { diff --git a/src/parser/lval.js b/src/parser/lval.js index 333b6457b8..4955ff5b5b 100644 --- a/src/parser/lval.js +++ b/src/parser/lval.js @@ -22,8 +22,18 @@ pp.toAssignable = function (node, isBinding) { node.type = "ObjectPattern"; 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; @@ -94,14 +104,25 @@ pp.parseSpread = function (refShorthandDefaultPos) { pp.parseRest = function () { let node = this.startNode(); this.next(); - node.argument = this.parseIdentifier(); + 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.parseIdentifier(true); @@ -120,7 +141,8 @@ 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; @@ -136,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)); } @@ -187,7 +209,7 @@ pp.checkLVal = function (expr, isBinding, checkClashes) { case "ObjectPattern": for (let prop of (expr.properties: Array)) { - if (prop.type === "Property") prop = prop.value; + if (prop.type === "ObjectProperty") prop = prop.value; this.checkLVal(prop, isBinding, checkClashes); } break; diff --git a/src/parser/node.js b/src/parser/node.js index d3544bc816..e0dcf33b08 100644 --- a/src/parser/node.js +++ b/src/parser/node.js @@ -21,8 +21,8 @@ class Node { loc: SourceLocation; __clone(): Node { - var node2 = new Node; - for (var key in this) node2[key] = this[key]; + let node2 = new Node; + for (let key in this) node2[key] = this[key]; return node2; } } diff --git a/src/parser/statement.js b/src/parser/statement.js index 14cc0daa40..ef7649dc4b 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -16,7 +16,7 @@ const pp = Parser.prototype; pp.parseTopLevel = function (file, program) { program.sourceType = this.options.sourceType; - this.parseBlockBody(program, true, tt.eof); + this.parseBlockBody(program, true, true, tt.eof); file.program = this.finishNode(program, "Program"); file.comments = this.state.comments; @@ -30,11 +30,21 @@ const loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; // TODO pp.parseDirective = function () { - let node = this.startNode(); - node.raw = this.input.slice(this.state.start, this.state.end); - node.value = node.raw.slice(1, -1); // remove quotes + 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(); - return this.finishNode(node, "Directive"); + + directive.value = this.finishNode(directiveLiteral, "DirectiveLiteral"); + + this.semicolon(); + return this.finishNode(directive, "Directive"); }; // Parse a single statement. @@ -89,16 +99,18 @@ 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.hasFeature("asyncFunctions") && this.state.value === "async") { + if (this.hasPlugin("asyncFunctions") && this.state.value === "async") { // peek ahead and see if next token is a function let state = this.state.clone(); this.next(); @@ -147,7 +159,7 @@ pp.parseDecorators = function (allowExport) { }; pp.parseDecorator = function () { - if (!this.hasFeature("decorators")) { + if (!this.hasPlugin("decorators")) { this.unexpected(); } let node = this.startNode(); @@ -171,7 +183,8 @@ pp.parseBreakContinueStatement = function (node, keyword) { // 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; @@ -288,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"); @@ -304,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"); @@ -325,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, Object.create(null)); this.expect(tt.parenR); + clause.body = this.parseBlock(); node.handler = this.finishNode(clause, "CatchClause"); } @@ -416,35 +437,55 @@ pp.parseExpressionStatement = function (node, expr) { // strict"` declarations when `allowStrict` is true (used for // function bodies). -pp.parseBlock = function (allowStrict) { +pp.parseBlock = function (allowDirectives?) { let node = this.startNode(); this.expect(tt.braceL); - this.parseBlockBody(node, allowStrict, tt.braceR); + this.parseBlockBody(node, allowDirectives, false, tt.braceR); return this.finishNode(node, "BlockStatement"); }; // TODO -pp.parseBlockBody = function (node, allowStrict, end) { +pp.parseBlockBody = function (node, allowDirectives, topLevel, end) { node.body = []; node.directives = []; let parsedNonDirective = false; let oldStrict; + let octalPosition; while (!this.eat(end)) { - if (!parsedNonDirective && this.match(tt.string)) { - let stmt = this.parseDirective(); - node.directives.push(stmt); + 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 (allowStrict && stmt.value === "use strict") { - oldStrict = this.state.strict; - this.setStrict(this.state.strict = true); + 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; } - } else { - parsedNonDirective = true; - node.body.push(this.parseStatement(true)); } + + parsedNonDirective = true; + node.body.push(this.parseStatement(true, topLevel)); } if (oldStrict === false) { @@ -514,25 +555,39 @@ pp.parseVarHead = function (decl) { // `isStatement` parameter). pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, optionalId) { - this.initFunction(node, isAsync); - node.generator = this.eat(tt.star); + let oldInMethod = this.state.inMethod; + this.state.inMethod = false; - if (isStatement && !optionalId && !this.match(tt.name)) { + 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)) { - node.id = this.parseIdentifier(); + 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.hasFeature("trailingFunctionCommas")); + node.params = this.parseBindingList(tt.parenR, false, this.hasPlugin("trailingFunctionCommas")); }; // Parse a class declaration or literal (depending on the @@ -542,51 +597,99 @@ pp.parseClass = function (node, isStatement, optionalId) { this.next(); 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.hasFeature("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 === "StringLiteral" && 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"); @@ -594,15 +697,37 @@ pp.parseClass = function (node, isStatement, optionalId) { 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 { @@ -617,16 +742,13 @@ pp.parseClass = function (node, isStatement, optionalId) { } 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.hasFeature("classProperties")) this.unexpected(); + if (!this.hasPlugin("classProperties")) this.unexpected(); this.next(); node.value = this.parseMaybeAssign(); } else { @@ -637,8 +759,8 @@ 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, optionalId) { @@ -665,7 +787,7 @@ pp.parseExport = function (node) { if (this.match(tt.star)) { let specifier = this.startNode(); this.next(); - if (this.hasFeature("exportExtensions") && this.eatContextual("as")) { + if (this.hasPlugin("exportExtensions") && this.eatContextual("as")) { specifier.exported = this.parseIdentifier(); node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; this.parseExportSpecifiersMaybe(node); @@ -674,7 +796,7 @@ pp.parseExport = function (node) { this.parseExportFrom(node, true); return this.finishNode(node, "ExportAllDeclaration"); } - } else if (this.hasFeature("exportExtensions") && this.isExportDefaultSpecifier()) { + } else if (this.hasPlugin("exportExtensions") && this.isExportDefaultSpecifier()) { let specifier = this.startNode(); specifier.exported = this.parseIdentifier(true); node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; @@ -730,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"); }; @@ -756,12 +878,12 @@ pp.parseExportFrom = function (node, expect?) { }; pp.shouldParseExportDeclaration = function () { - return this.hasFeature("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"); } @@ -826,10 +948,10 @@ 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; + let startPos = this.state.start, startLoc = this.state.startLoc; node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), startPos, startLoc)); if (!this.eat(tt.comma)) return; } @@ -862,7 +984,7 @@ pp.parseImportSpecifiers = function (node) { }; 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 e20e2467c9..64d4bffe3c 100644 --- a/src/parser/util.js +++ b/src/parser/util.js @@ -13,7 +13,7 @@ const pp = Parser.prototype; pp.addExtra = function (node, key, val) { if (!node) return; - var extra = node.extra = node.extra || {}; + let extra = node.extra = node.extra || {}; extra[key] = val; }; diff --git a/src/plugins/flow.js b/src/plugins/flow.js index 7fe1d97d19..25e0ced340 100644 --- a/src/plugins/flow.js +++ b/src/plugins/flow.js @@ -3,13 +3,13 @@ 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; }; @@ -23,10 +23,10 @@ pp.flowParseDeclareClass = function (node) { pp.flowParseDeclareFunction = function (node) { this.next(); - var id = node.id = this.parseIdentifier(); + 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(); @@ -35,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); @@ -81,11 +81,11 @@ pp.flowParseDeclareModule = function (node) { 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(); @@ -122,7 +122,7 @@ pp.flowParseInterfaceish = function (node, allowStatic) { }; pp.flowParseInterfaceExtends = function () { - var node = this.startNode(); + let node = this.startNode(); node.id = this.parseIdentifier(); if (this.isRelational("<")) { @@ -159,7 +159,7 @@ pp.flowParseTypeAlias = function (node) { // Type annotations pp.flowParseTypeParameterDeclaration = function () { - var node = this.startNode(); + let node = this.startNode(); node.params = []; this.expectRelational("<"); @@ -175,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; @@ -238,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; @@ -248,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(); @@ -256,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 = []; @@ -268,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(); @@ -315,13 +315,13 @@ 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.parseIdentifier(); node.id = this.finishNode(node2, "QualifiedTypeIdentifier"); @@ -335,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 @@ -356,8 +356,8 @@ pp.flowParseTupleType = function () { }; pp.flowParseFunctionTypeParam = function () { - var optional = false; - var node = this.startNode(); + let optional = false; + let node = this.startNode(); node.name = this.parseIdentifier(); if (this.eat(tt.question)) { optional = true; @@ -368,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)) { @@ -411,11 +411,11 @@ 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: @@ -449,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; @@ -490,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"); @@ -501,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"); @@ -516,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); @@ -528,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"); @@ -538,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()); @@ -548,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()); @@ -558,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.parseIdentifier(); - var isOptionalParam = false; + let ident = this.parseIdentifier(); + let isOptionalParam = false; if (canBeOptionalParam && this.eat(tt.question)) { this.expect(tt.question); @@ -612,7 +614,7 @@ export default function (instance) { return function (declaration, topLevel) { // strict mode handling of `interface` since it's a reserved word if (this.state.strict && this.match(tt.name) && this.state.value === "interface") { - var node = this.startNode(); + let node = this.startNode(); this.next(); return this.flowParseInterface(node); } else { @@ -652,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(); @@ -662,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 { @@ -689,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)) { @@ -754,8 +756,8 @@ export default function (instance) { // 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); } @@ -768,8 +770,8 @@ export default function (instance) { // 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"); } @@ -783,8 +785,8 @@ export default function (instance) { // 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; @@ -816,13 +818,11 @@ export default function (instance) { // 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")); }; }); @@ -835,7 +835,7 @@ 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.parseIdentifier(); @@ -853,7 +853,7 @@ 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("<")) { @@ -865,7 +865,7 @@ export default function (instance) { // add typeParameters if we found them if (typeParameters) { - prop.value.typeParameters = typeParameters; + (prop.value || prop).typeParameters = typeParameters; } }; }); @@ -889,14 +889,14 @@ export default function (instance) { return function (node) { node.importKind = "value"; - var kind = 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; @@ -917,7 +917,7 @@ export default function (instance) { }; }); - // parse flow type annotations on variable declarator heads - 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); @@ -928,7 +928,7 @@ export default function (instance) { }; }); - // parse the return type of an async arrow function - 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)) { @@ -953,7 +953,7 @@ export default function (instance) { 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); @@ -962,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 c373f88b8d..2d466d4ece 100644 --- a/src/plugins/jsx/index.js +++ b/src/plugins/jsx/index.js @@ -26,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; @@ -35,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: // "<" @@ -80,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; @@ -96,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); @@ -121,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 === ";") { @@ -161,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); // "-" @@ -187,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) { @@ -202,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"); @@ -216,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"); @@ -230,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(); @@ -243,7 +248,7 @@ pp.jsxParseAttributeValue = function() { case tt.jsxTagStart: case tt.string: node = this.parseExprAtom(); - node.rawValue = null; + node.extra = null; return node; default: @@ -251,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(); @@ -285,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(); @@ -300,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)) { @@ -314,7 +312,7 @@ pp.jsxParseOpeningElementAt = function(startPos, startLoc) { // Parses JSX closing tag starting after "= this.input.length) return this.finishToken(tt.eof); @@ -162,7 +154,7 @@ export default class Tokenizer { } pushComment(block, text, start, end, startLoc, endLoc) { - var comment = { + let comment = { type: block ? "CommentBlock" : "CommentLine", value: text, start: start, @@ -308,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.hasFeature("exponentiationOperator")) { // '*' + if (next === 42 && this.hasPlugin("exponentiationOperator")) { // '*' width++; next = this.input.charCodeAt(this.state.pos + 2); type = tt.exponent; @@ -415,7 +407,7 @@ export default class Tokenizer { case 125: ++this.state.pos; return this.finishToken(tt.braceR); case 58: - if (this.hasFeature("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; @@ -694,8 +686,14 @@ export default class Tokenizer { octalStr = octalStr.slice(0, -1); octal = parseInt(octalStr, 8); } - if (octal > 0 && (this.state.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); diff --git a/src/tokenizer/state.js b/src/tokenizer/state.js index b536a1fd8a..63107de019 100644 --- a/src/tokenizer/state.js +++ b/src/tokenizer/state.js @@ -14,7 +14,7 @@ export default class State { this.potentialArrowAt = -1; - this.inFunction = this.inGenerator = false; + this.inMethod = this.inFunction = this.inGenerator = this.inAsync = false; this.labels = []; @@ -42,7 +42,8 @@ export default class State { this.context = [ct.b_stat]; this.exprAllowed = true; - this.containsEsc = false; + this.containsEsc = this.containsOctal = false; + this.octalPosition = null; return this; } @@ -59,6 +60,7 @@ export default class State { // Flags to track whether we are in a function, a generator. inFunction: boolean; inGenerator: boolean; + inMethod: boolean; // Labels in scope. labels: Array; @@ -115,16 +117,20 @@ export default class State { // 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(skipArrays?) { - var state = new State; - for (var key in this) { - var val = this[key]; + let state = new State; + for (let key in this) { + let val = this[key]; - if (!skipArrays && Array.isArray(val)) { + if ((!skipArrays || key === "context") && Array.isArray(val)) { val = val.slice(); } diff --git a/src/tokenizer/types.js b/src/tokenizer/types.js index 90b60f4ca2..fa8ff99bab 100644 --- a/src/tokenizer/types.js +++ b/src/tokenizer/types.js @@ -115,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 947e993ade..09045f8af0 100644 --- a/src/util/identifier.js +++ b/src/util/identifier.js @@ -49,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, @@ -62,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/test/fixtures/comments/basic/export-default-anonymous-class/expected.json b/test/fixtures/comments/basic/export-default-anonymous-class/expected.json index 3599105db1..e42c57b979 100755 --- a/test/fixtures/comments/basic/export-default-anonymous-class/expected.json +++ b/test/fixtures/comments/basic/export-default-anonymous-class/expected.json @@ -74,7 +74,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 103, "end": 119, "loc": { @@ -107,41 +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": [], - "directives": [] - } + "body": [], + "directives": [] }, "leadingComments": [ { 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/22/expected.json b/test/fixtures/core/uncategorised/22/expected.json index 0ea258d194..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": { @@ -140,8 +140,7 @@ "raw": "42" }, "value": 42 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/core/uncategorised/23/expected.json b/test/fixtures/core/uncategorised/23/expected.json index 6000da8339..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": { @@ -140,8 +140,7 @@ "raw": "42" }, "value": 42 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/core/uncategorised/24/expected.json b/test/fixtures/core/uncategorised/24/expected.json index a958d6780e..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": { @@ -140,8 +140,7 @@ "raw": "42" }, "value": 42 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/core/uncategorised/25/expected.json b/test/fixtures/core/uncategorised/25/expected.json index d4911b1226..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": { @@ -140,8 +140,7 @@ "raw": "42" }, "value": 42 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/core/uncategorised/26/expected.json b/test/fixtures/core/uncategorised/26/expected.json index 61e13ba2b5..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": { @@ -140,8 +140,7 @@ "raw": "42" }, "value": 42 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/core/uncategorised/27/expected.json b/test/fixtures/core/uncategorised/27/expected.json index e7f3c00497..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": { @@ -144,8 +144,7 @@ "raw": "42" }, "value": 42 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/core/uncategorised/275/expected.json b/test/fixtures/core/uncategorised/275/expected.json index 0ddcce0c63..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": { @@ -109,8 +109,7 @@ "raw": "\"Error\"" }, "value": "Error" - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/core/uncategorised/28/expected.json b/test/fixtures/core/uncategorised/28/expected.json index d7de811e96..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": { @@ -140,11 +140,10 @@ "raw": "1" }, "value": 1 - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 12, "end": 16, "loc": { @@ -195,8 +194,7 @@ "raw": "2" }, "value": 2 - }, - "kind": "init" + } } ] } 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/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/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/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/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/35/expected.json b/test/fixtures/core/uncategorised/35/expected.json index da3ec9be77..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": { @@ -126,41 +126,26 @@ "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/core/uncategorised/36/expected.json b/test/fixtures/core/uncategorised/36/expected.json index a7cfe82d4d..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": { @@ -126,41 +126,26 @@ "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ] 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/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 359994f749..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": { @@ -126,58 +126,58 @@ "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": { @@ -190,58 +190,43 @@ "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": [] } } ] diff --git a/test/fixtures/core/uncategorised/43/expected.json b/test/fixtures/core/uncategorised/43/expected.json index 40439f6021..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": { @@ -126,58 +126,58 @@ "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": { @@ -190,58 +190,43 @@ "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": [] } } ] diff --git a/test/fixtures/core/uncategorised/44/expected.json b/test/fixtures/core/uncategorised/44/expected.json index 717aa6f7e7..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": { @@ -140,8 +140,7 @@ "raw": "42" }, "value": 42 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/core/uncategorised/45/expected.json b/test/fixtures/core/uncategorised/45/expected.json index 01d280ce5b..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": { @@ -140,8 +140,7 @@ "raw": "43" }, "value": 43 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json index 16876bb02e..a0efeec910 100644 --- a/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/patterned-catch/expected.json @@ -136,7 +136,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 21, "end": 22, "loc": { @@ -168,7 +168,6 @@ }, "name": "c" }, - "kind": "init", "value": { "type": "Identifier", "start": 21, @@ -187,7 +186,7 @@ } }, { - "type": "Property", + "type": "ObjectProperty", "start": 24, "end": 29, "loc": { @@ -269,11 +268,10 @@ }, "value": 0 } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 31, "end": 38, "loc": { @@ -355,11 +353,10 @@ }, "value": 0 } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 40, "end": 43, "loc": { @@ -391,7 +388,6 @@ }, "name": "h" }, - "kind": "init", "value": { "type": "AssignmentPattern", "start": 40, 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 index 2d14e8848e..1c46501964 100644 --- a/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json +++ b/test/fixtures/esprima/es2015-array-pattern/with-object-pattern/expected.json @@ -88,7 +88,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 6, "end": 7, "loc": { @@ -120,7 +120,6 @@ }, "name": "a" }, - "kind": "init", "value": { "type": "Identifier", "start": 6, diff --git a/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json index fbd87bd0c4..8025e7a342 100644 --- a/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-arrow-function/migrated_0005/expected.json @@ -93,7 +93,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 8, "end": 20, "loc": { @@ -144,8 +144,7 @@ "raw": "42" }, "value": 42 - }, - "kind": "init" + } } ], "extra": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0026/actual.js b/test/fixtures/esprima/es2015-class/.migrated_0026/actual.js similarity index 100% rename from test/fixtures/esprima/es2015-class/migrated_0026/actual.js rename to test/fixtures/esprima/es2015-class/.migrated_0026/actual.js diff --git a/test/fixtures/esprima/es2015-class/migrated_0026/expected.json b/test/fixtures/esprima/es2015-class/.migrated_0026/expected.json similarity index 98% rename from test/fixtures/esprima/es2015-class/migrated_0026/expected.json rename to test/fixtures/esprima/es2015-class/.migrated_0026/expected.json index 7354aa5050..c69f6a312a 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0026/expected.json +++ b/test/fixtures/esprima/es2015-class/.migrated_0026/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 18, "loc": { diff --git a/test/fixtures/esprima/es2015-class/migrated_0004/expected.json b/test/fixtures/esprima/es2015-class/migrated_0004/expected.json index e60d7294c3..3e510efdc1 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0004/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 14, "loc": { @@ -107,45 +107,32 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 10, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 12, "end": 14, "loc": { "start": { "line": 1, - "column": 10 + "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": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0005/expected.json b/test/fixtures/esprima/es2015-class/migrated_0005/expected.json index 4ead53f755..1ec03c3f48 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0005/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0005/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 14, "loc": { @@ -107,44 +107,30 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 10, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 12, "end": 14, "loc": { "start": { "line": 1, - "column": 10 + "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": "MethodDefinition", + "type": "ClassMethod", "start": 14, "end": 19, "loc": { @@ -176,45 +162,32 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 15, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, "end": 19, "loc": { "start": { "line": 1, - "column": 15 + "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/esprima/es2015-class/migrated_0006/expected.json b/test/fixtures/esprima/es2015-class/migrated_0006/expected.json index a4bb492dbb..c883c50114 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0006/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0006/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 14, "loc": { @@ -107,44 +107,30 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 10, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 12, "end": 14, "loc": { "start": { "line": 1, - "column": 10 + "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": "MethodDefinition", + "type": "ClassMethod", "start": 15, "end": 20, "loc": { @@ -176,45 +162,32 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 16, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 18, "end": 20, "loc": { "start": { "line": 1, - "column": 16 + "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/esprima/es2015-class/migrated_0007/expected.json b/test/fixtures/esprima/es2015-class/migrated_0007/expected.json index 77aa858ee4..57df44f925 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0007/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0007/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 14, "loc": { @@ -107,44 +107,30 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 10, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 12, "end": 14, "loc": { "start": { "line": 1, - "column": 10 + "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": "MethodDefinition", + "type": "ClassMethod", "start": 15, "end": 20, "loc": { @@ -176,45 +162,32 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 16, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 18, "end": 20, "loc": { "start": { "line": 1, - "column": 16 + "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/esprima/es2015-class/migrated_0008/expected.json b/test/fixtures/esprima/es2015-class/migrated_0008/expected.json index f0da7ec99b..129657a7fc 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0008/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0008/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 10, "end": 15, "loc": { @@ -107,44 +107,30 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 11, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, "end": 15, "loc": { "start": { "line": 1, - "column": 11 + "column": 13 }, "end": { "line": 1, "column": 15 } }, - "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": [] - } + "body": [], + "directives": [] } }, { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 16, "end": 21, "loc": { @@ -176,45 +162,32 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 17, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 19, "end": 21, "loc": { "start": { "line": 1, - "column": 17 + "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": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0009/expected.json b/test/fixtures/esprima/es2015-class/migrated_0009/expected.json index 0cd6f1a23f..aa0a5f9344 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0009/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0009/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 19, "loc": { @@ -107,45 +107,32 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 15, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, "end": 19, "loc": { "start": { "line": 1, - "column": 15 + "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/esprima/es2015-class/migrated_0010/expected.json b/test/fixtures/esprima/es2015-class/migrated_0010/expected.json index b2101dd75c..92e8ef8e43 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0010/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0010/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 18, "loc": { @@ -107,44 +107,30 @@ }, "static": false, "kind": "get", - "value": { - "type": "FunctionExpression", - "start": 14, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 16, "end": 18, "loc": { "start": { "line": 1, - "column": 14 + "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": 29, "loc": { @@ -176,62 +162,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": "c" + } + ], + "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": [ - { - "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": [] - } + "body": [], + "directives": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0011/expected.json b/test/fixtures/esprima/es2015-class/migrated_0011/expected.json index 1c0665ae72..c6498e9b27 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0011/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0011/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 21, "loc": { @@ -107,44 +107,30 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 17, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 19, "end": 21, "loc": { "start": { "line": 1, - "column": 17 + "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": [] } }, { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 22, "end": 38, "loc": { @@ -176,44 +162,30 @@ }, "static": true, "kind": "get", - "value": { - "type": "FunctionExpression", - "start": 34, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 36, "end": 38, "loc": { "start": { "line": 1, - "column": 34 + "column": 36 }, "end": { "line": 1, "column": 38 } }, - "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": [] - } + "body": [], + "directives": [] } }, { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 39, "end": 56, "loc": { @@ -245,62 +217,49 @@ }, "static": true, "kind": "set", - "value": { - "type": "FunctionExpression", - "start": 51, + "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": 51 + "column": 54 }, "end": { "line": 1, "column": 56 } }, - "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": [] - } + "body": [], + "directives": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0012/expected.json b/test/fixtures/esprima/es2015-class/migrated_0012/expected.json index b1acc4da5f..fa54d94267 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0012/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0012/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 21, "loc": { @@ -107,45 +107,32 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 17, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 19, "end": 21, "loc": { "start": { "line": 1, - "column": 17 + "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": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0013/expected.json b/test/fixtures/esprima/es2015-class/migrated_0013/expected.json index a366c8ad3f..c7ff2d5228 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0013/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0013/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 23, "loc": { @@ -107,45 +107,32 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 19, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 21, "end": 23, "loc": { "start": { "line": 1, - "column": 19 + "column": 21 }, "end": { "line": 1, "column": 23 } }, - "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": [] - } + "body": [], + "directives": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0014/expected.json b/test/fixtures/esprima/es2015-class/migrated_0014/expected.json index b9887ebdf9..3a78f1bd7d 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0014/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0014/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 22, "loc": { @@ -107,44 +107,30 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 18, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 20, "end": 22, "loc": { "start": { "line": 1, - "column": 18 + "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": 24, "end": 37, "loc": { @@ -176,45 +162,32 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 33, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 35, "end": 37, "loc": { "start": { "line": 1, - "column": 33 + "column": 35 }, "end": { "line": 1, "column": 37 } }, - "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": [] - } + "body": [], + "directives": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0015/expected.json b/test/fixtures/esprima/es2015-class/migrated_0015/expected.json index 7e151a458e..ade3ae124b 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0015/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0015/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 26, "loc": { @@ -107,45 +107,32 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 22, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 24, "end": 26, "loc": { "start": { "line": 1, - "column": 22 + "column": 24 }, "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": [] - } + "body": [], + "directives": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0017/expected.json b/test/fixtures/esprima/es2015-class/migrated_0017/expected.json index a887878c99..2a2d1f81f9 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0017/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0017/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 22, "loc": { @@ -107,45 +107,32 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 18, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 20, "end": 22, "loc": { "start": { "line": 1, - "column": 18 + "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/esprima/es2015-class/migrated_0018/expected.json b/test/fixtures/esprima/es2015-class/migrated_0018/expected.json index 4ce9a1e28c..8a0d50c2c6 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0018/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0018/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 24, "loc": { @@ -107,45 +107,32 @@ }, "static": false, "kind": "constructor", - "value": { - "type": "FunctionExpression", - "start": 20, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 22, "end": 24, "loc": { "start": { "line": 1, - "column": 20 + "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": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0019/expected.json b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json index d991009313..72bb521716 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0019/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0019/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 26, "loc": { @@ -111,45 +111,30 @@ }, "static": false, "kind": "constructor", - "value": { - "type": "FunctionExpression", - "start": 22, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 24, "end": 26, "loc": { "start": { "line": 1, - "column": 22 + "column": 24 }, "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": [] - } + "body": [], + "directives": [] } }, { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 27, "end": 46, "loc": { @@ -185,41 +170,26 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 42, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 44, "end": 46, "loc": { "start": { "line": 1, - "column": 42 + "column": 44 }, "end": { "line": 1, "column": 46 } }, - "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": [] - } + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/esprima/es2015-class/migrated_0020/expected.json b/test/fixtures/esprima/es2015-class/migrated_0020/expected.json index 0241df155f..8ee060397d 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0020/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0020/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 31, "loc": { @@ -107,44 +107,30 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 27, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 29, "end": 31, "loc": { "start": { "line": 1, - "column": 27 + "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": [] } }, { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 32, "end": 54, "loc": { @@ -176,45 +162,32 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 50, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 52, "end": 54, "loc": { "start": { "line": 1, - "column": 50 + "column": 52 }, "end": { "line": 1, "column": 54 } }, - "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": [] - } + "body": [], + "directives": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-class/migrated_0021/expected.json b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json index 21d43a0b9f..05b3f0a4ac 100644 --- a/test/fixtures/esprima/es2015-class/migrated_0021/expected.json +++ b/test/fixtures/esprima/es2015-class/migrated_0021/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 33, "loc": { @@ -111,41 +111,26 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 29, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 31, "end": 33, "loc": { "start": { "line": 1, - "column": 29 + "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ] 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 index 0fdbc8a52e..64c3b49fae 100644 --- a/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-default-parameter-value/migrated_0002/expected.json @@ -89,7 +89,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 6, "end": 25, "loc": { @@ -208,8 +208,7 @@ "body": [], "directives": [] } - }, - "kind": "init" + } } ] } 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 index 70b18e9e2e..9c12c4fa9c 100644 --- 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 @@ -88,7 +88,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 2, "end": 5, "loc": { @@ -120,7 +120,6 @@ }, "name": "a" }, - "kind": "init", "value": { "type": "AssignmentPattern", "start": 2, 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 index e4d7cfd018..559a8db8fc 100644 --- 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 @@ -373,7 +373,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 21, "end": 27, "loc": { @@ -405,7 +405,6 @@ }, "name": "a" }, - "kind": "init", "value": { "type": "AssignmentPattern", "start": 21, 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 index 4521c6e3bf..aab8a1a69e 100644 --- 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 @@ -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, @@ -124,7 +123,7 @@ } }, { - "type": "Property", + "type": "ObjectProperty", "start": 14, "end": 17, "loc": { @@ -171,11 +170,10 @@ } }, "name": "a" - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 23, "end": 28, "loc": { @@ -253,11 +251,10 @@ }, "name": "a" } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 34, "end": 41, "loc": { @@ -305,7 +302,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 39, "end": 40, "loc": { @@ -337,7 +334,6 @@ }, "name": "a" }, - "kind": "init", "value": { "type": "Identifier", "start": 39, @@ -356,11 +352,10 @@ } } ] - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 47, "end": 63, "loc": { @@ -455,11 +450,10 @@ "name": "a" }, "computed": true - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 69, "end": 77, "loc": { @@ -537,8 +531,7 @@ "name": "a" }, "computed": false - }, - "kind": "init" + } } ] }, 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 index 5d9a5f6369..ae7eefb6d2 100644 --- a/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json +++ b/test/fixtures/esprima/es2015-export-declaration/export-default-object/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 17, "end": 23, "loc": { @@ -109,8 +109,7 @@ "raw": "1" }, "value": 1 - }, - "kind": "init" + } } ] } 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 index 2fcb51b5b1..bf3b9e73b7 100644 --- 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 @@ -87,7 +87,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 12, "end": 13, "loc": { @@ -119,7 +119,6 @@ }, "name": "x" }, - "kind": "init", "value": { "type": "Identifier", "start": 12, @@ -138,7 +137,7 @@ } }, { - "type": "Property", + "type": "ObjectProperty", "start": 15, "end": 16, "loc": { @@ -170,7 +169,6 @@ }, "name": "y" }, - "kind": "init", "value": { "type": "Identifier", "start": 15, @@ -227,6 +225,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index 9cfd59a3ab..025d0acd2b 100644 --- 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 @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 6, "end": 7, "loc": { @@ -90,7 +90,6 @@ }, "name": "x" }, - "kind": "init", "value": { "type": "Identifier", "start": 6, @@ -109,7 +108,7 @@ } }, { - "type": "Property", + "type": "ObjectProperty", "start": 9, "end": 10, "loc": { @@ -141,7 +140,6 @@ }, "name": "y" }, - "kind": "init", "value": { "type": "Identifier", "start": 9, @@ -193,6 +191,7 @@ } } } - ] + ], + "directives": [] } } \ 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 similarity index 100% rename from test/fixtures/esprima/es2015-generator/generator-parameter-binding-property-reserved/actual.js rename to test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-generator/generator-parameter-binding-property-reserved/expected.json rename to test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-generator/generator-parameter-binding-property-reserved/options.json rename to test/fixtures/esprima/es2015-generator/.generator-parameter-binding-property-reserved/options.json 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 index 7c3e3bcb37..ef567c630d 100644 --- a/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-params/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 3, "end": 19, "loc": { @@ -90,91 +90,76 @@ }, "name": "foo" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 7, + "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": 7 + "column": 17 }, "end": { "line": 1, "column": 19 } }, - "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": [] - } + "body": [], + "directives": [] } } ], 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 index 8b5ee65941..a261ce50a1 100644 --- 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 @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 3, "end": 23, "loc": { @@ -90,44 +90,44 @@ }, "name": "foo" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 7, + "kind": "method", + "id": null, + "generator": true, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 10, "end": 23, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 }, "end": { "line": 1, "column": 23 } }, - "id": null, - "generator": true, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 10, - "end": 23, - "loc": { - "start": { - "line": 1, - "column": 10 + "body": [ + { + "type": "ExpressionStatement", + "start": 12, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 21 + } }, - "end": { - "line": 1, - "column": 23 - } - }, - "body": [ - { - "type": "ExpressionStatement", + "expression": { + "type": "YieldExpression", "start": 12, - "end": 21, + "end": 20, "loc": { "start": { "line": 1, @@ -135,49 +135,34 @@ }, "end": { "line": 1, - "column": 21 + "column": 20 } }, - "expression": { - "type": "YieldExpression", - "start": 12, + "delegate": true, + "argument": { + "type": "NumberLiteral", + "start": 19, "end": 20, "loc": { "start": { "line": 1, - "column": 12 + "column": 19 }, "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 - } + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } - ], - "directives": [] - } + } + ], + "directives": [] } } ], 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 index 14d2a18a84..d43ba66132 100644 --- 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 @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 3, "end": 22, "loc": { @@ -90,44 +90,44 @@ }, "name": "foo" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 7, + "kind": "method", + "id": null, + "generator": true, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 10, "end": 22, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 }, "end": { "line": 1, "column": 22 } }, - "id": null, - "generator": true, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 10, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 10 + "body": [ + { + "type": "ExpressionStatement", + "start": 12, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 20 + } }, - "end": { - "line": 1, - "column": 22 - } - }, - "body": [ - { - "type": "ExpressionStatement", + "expression": { + "type": "YieldExpression", "start": 12, - "end": 20, + "end": 19, "loc": { "start": { "line": 1, @@ -135,49 +135,34 @@ }, "end": { "line": 1, - "column": 20 + "column": 19 } }, - "expression": { - "type": "YieldExpression", - "start": 12, + "delegate": false, + "argument": { + "type": "NumberLiteral", + "start": 18, "end": 19, "loc": { "start": { "line": 1, - "column": 12 + "column": 18 }, "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 - } + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } } - ], - "directives": [] - } + } + ], + "directives": [] } } ], 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 index 110cc9c9cb..addacb6d05 100644 --- 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 @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 3, "end": 26, "loc": { @@ -90,42 +90,42 @@ }, "name": "foo" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 7, + "kind": "method", + "id": null, + "generator": true, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 10, "end": 26, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 }, "end": { "line": 4, "column": 1 } }, - "id": null, - "generator": true, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 10, - "end": 26, - "loc": { - "start": { - "line": 1, - "column": 10 + "body": [ + { + "type": "ExpressionStatement", + "start": 15, + "end": 20, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 7 + } }, - "end": { - "line": 4, - "column": 1 - } - }, - "body": [ - { - "type": "ExpressionStatement", + "expression": { + "type": "YieldExpression", "start": 15, "end": 20, "loc": { @@ -138,26 +138,26 @@ "column": 7 } }, - "expression": { - "type": "YieldExpression", - "start": 15, - "end": 20, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 7 - } - }, - "delegate": false, - "argument": null + "delegate": false, + "argument": null + } + }, + { + "type": "ExpressionStatement", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 } }, - { - "type": "ExpressionStatement", + "expression": { + "type": "NumberLiteral", "start": 23, "end": 24, "loc": { @@ -170,30 +170,15 @@ "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 - } + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3 } - ], - "directives": [] - } + } + ], + "directives": [] } } ], 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 index c749a9dbaf..9bd0e0fc9b 100644 --- a/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-method-with-yield/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 3, "end": 20, "loc": { @@ -90,44 +90,44 @@ }, "name": "foo" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 7, + "kind": "method", + "id": null, + "generator": true, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 10, "end": 20, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 }, "end": { "line": 1, "column": 20 } }, - "id": null, - "generator": true, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 10, - "end": 20, - "loc": { - "start": { - "line": 1, - "column": 10 + "body": [ + { + "type": "ExpressionStatement", + "start": 12, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 18 + } }, - "end": { - "line": 1, - "column": 20 - } - }, - "body": [ - { - "type": "ExpressionStatement", + "expression": { + "type": "YieldExpression", "start": 12, - "end": 18, + "end": 17, "loc": { "start": { "line": 1, @@ -135,30 +135,15 @@ }, "end": { "line": 1, - "column": 18 + "column": 17 } }, - "expression": { - "type": "YieldExpression", - "start": 12, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "delegate": false, - "argument": null - } + "delegate": false, + "argument": null } - ], - "directives": [] - } + } + ], + "directives": [] } } ], diff --git a/test/fixtures/esprima/es2015-generator/generator-method/expected.json b/test/fixtures/esprima/es2015-generator/generator-method/expected.json index a5bb9c44cb..1edf3cf6b7 100644 --- a/test/fixtures/esprima/es2015-generator/generator-method/expected.json +++ b/test/fixtures/esprima/es2015-generator/generator-method/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 3, "end": 12, "loc": { @@ -90,42 +90,27 @@ }, "name": "foo" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 7, + "kind": "method", + "id": null, + "generator": true, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 10, "end": 12, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 }, "end": { "line": 1, "column": 12 } }, - "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": [] - } + "body": [], + "directives": [] } } ], 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 index d257165465..39c163121b 100644 --- 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 @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 12, "end": 30, "loc": { @@ -107,45 +107,32 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 25, + "id": null, + "generator": true, + "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": true, - "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/esprima/es2015-generator/static-generator-method/expected.json b/test/fixtures/esprima/es2015-generator/static-generator-method/expected.json index bebbec9f26..655985c272 100644 --- a/test/fixtures/esprima/es2015-generator/static-generator-method/expected.json +++ b/test/fixtures/esprima/es2015-generator/static-generator-method/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 12, "end": 28, "loc": { @@ -107,45 +107,32 @@ }, "static": true, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 23, + "id": null, + "generator": true, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 26, "end": 28, "loc": { "start": { "line": 1, - "column": 23 + "column": 26 }, "end": { "line": 1, "column": 28 } }, - "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": [] - } + "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 similarity index 100% rename from test/fixtures/esprima/es2015-identifier/invalid_function_wait/actual.js rename to test/fixtures/esprima/es2015-identifier/.invalid_function_wait/actual.js diff --git a/test/fixtures/esprima/es2015-identifier/invalid_function_wait/expected.json b/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/expected.json similarity index 100% rename from test/fixtures/esprima/es2015-identifier/invalid_function_wait/expected.json rename to test/fixtures/esprima/es2015-identifier/.invalid_function_wait/expected.json diff --git a/test/fixtures/esprima/es2015-identifier/invalid_function_wait/options.json b/test/fixtures/esprima/es2015-identifier/.invalid_function_wait/options.json similarity index 100% rename from test/fixtures/esprima/es2015-identifier/invalid_function_wait/options.json rename to test/fixtures/esprima/es2015-identifier/.invalid_function_wait/options.json diff --git a/test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/actual.js b/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/actual.js similarity index 100% rename from test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/actual.js rename to test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/actual.js diff --git a/test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/expected.json b/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/expected.json similarity index 100% rename from test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/expected.json rename to test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/expected.json diff --git a/test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/options.json b/test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/options.json similarity index 100% rename from test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/options.json rename to test/fixtures/esprima/es2015-identifier/.invalid_lone_surrogate/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-meta-property/invalid-new-target/actual.js rename to test/fixtures/esprima/es2015-meta-property/.invalid-new-target/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-meta-property/invalid-new-target/expected.json rename to test/fixtures/esprima/es2015-meta-property/.invalid-new-target/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-meta-property/invalid-new-target/options.json rename to test/fixtures/esprima/es2015-meta-property/.invalid-new-target/options.json diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0000/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0000/expected.json index 5d4235ff90..880dce74c2 100644 --- a/test/fixtures/esprima/es2015-method-definition/migrated_0000/expected.json +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0000/expected.json @@ -89,7 +89,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 6, "end": 18, "loc": { @@ -121,47 +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": [] } } ] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0001/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0001/expected.json index 9e72a8c644..7d5dce4954 100644 --- a/test/fixtures/esprima/es2015-method-definition/migrated_0001/expected.json +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0001/expected.json @@ -89,7 +89,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 6, "end": 22, "loc": { @@ -121,64 +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": [] } } ] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json index e964b38846..1030bf0af2 100644 --- a/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0002/expected.json @@ -89,7 +89,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 6, "end": 20, "loc": { @@ -125,42 +125,27 @@ }, "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0003/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0003/expected.json index 986432a828..0b0d3f1c10 100644 --- a/test/fixtures/esprima/es2015-method-definition/migrated_0003/expected.json +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0003/expected.json @@ -89,7 +89,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 6, "end": 15, "loc": { @@ -121,47 +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": [] } } ] } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-method-definition/migrated_0004/expected.json b/test/fixtures/esprima/es2015-method-definition/migrated_0004/expected.json index 8d18a3447c..b118b76443 100644 --- a/test/fixtures/esprima/es2015-method-definition/migrated_0004/expected.json +++ b/test/fixtures/esprima/es2015-method-definition/migrated_0004/expected.json @@ -89,7 +89,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 6, "end": 15, "loc": { @@ -121,47 +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": [] } } ] } } } - ] + ], + "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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-getter-literal-identifier/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-getter-literal-identifier/expected.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-getter-literal-identifier/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-getter-literal-identifier/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-literal/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-literal/expected.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-literal/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-literal/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/expected.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifier-shorthand/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifiers/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifiers/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-identifiers/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-identifier/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-identifier/expected.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-identifier/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-identifier/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/expected.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literal-shorthand/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literals/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literals/expected.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literals/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-literals/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-setter-literal-identifier/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-setter-literal-identifier/expected.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-setter-literal-identifier/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-setter-literal-identifier/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/expected.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-identifier/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/expected.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthand-literal/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/actual.js rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/expected.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json rename to test/fixtures/esprima/es2015-object-initialiser/.invalid-proto-shorthands/options.json 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 index 370894461a..41fa69789a 100644 --- 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 @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 3, "end": 18, "loc": { @@ -104,11 +104,10 @@ "column": 18 } } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectMethod", "start": 20, "end": 37, "loc": { @@ -141,45 +140,30 @@ "name": "__proto__" }, "kind": "get", - "value": { - "type": "FunctionExpression", - "start": 33, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 35, "end": 37, "loc": { "start": { "line": 1, - "column": 33 + "column": 35 }, "end": { "line": 1, "column": 37 } }, - "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": [] - } + "body": [], + "directives": [] } }, { - "type": "Property", + "type": "ObjectMethod", "start": 39, "end": 57, "loc": { @@ -212,58 +196,43 @@ "name": "__proto__" }, "kind": "set", - "value": { - "type": "FunctionExpression", - "start": 52, + "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": 52 + "column": 55 }, "end": { "line": 1, "column": 57 } }, - "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": [] - } + "body": [], + "directives": [] } } ], 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 index 987143a14c..73ee6c7acf 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-getter/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 3, "end": 18, "loc": { @@ -104,11 +104,10 @@ "column": 18 } } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectMethod", "start": 20, "end": 37, "loc": { @@ -141,41 +140,26 @@ "name": "__proto__" }, "kind": "get", - "value": { - "type": "FunctionExpression", - "start": 33, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 35, "end": 37, "loc": { "start": { "line": 1, - "column": 33 + "column": 35 }, "end": { "line": 1, "column": 37 } }, - "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": [] - } + "body": [], + "directives": [] } } ], 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 index 63dc917941..8213ba1bb4 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-method/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 3, "end": 18, "loc": { @@ -104,11 +104,10 @@ "column": 18 } } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectMethod", "start": 20, "end": 33, "loc": { @@ -140,42 +139,27 @@ }, "name": "__proto__" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 29, + "kind": "method", + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 31, "end": 33, "loc": { "start": { "line": 1, - "column": 29 + "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ], 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 index 70085edf6a..3e06b6b52c 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-setter/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 3, "end": 18, "loc": { @@ -104,11 +104,10 @@ "column": 18 } } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectMethod", "start": 20, "end": 38, "loc": { @@ -141,58 +140,43 @@ "name": "__proto__" }, "kind": "set", - "value": { - "type": "FunctionExpression", - "start": 33, + "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": 33 + "column": 36 }, "end": { "line": 1, "column": 38 } }, - "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": [] - } + "body": [], + "directives": [] } } ], 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 index 48f265cc99..a1524c4a1f 100644 --- 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 @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 3, "end": 20, "loc": { @@ -108,11 +108,10 @@ "column": 20 } } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectMethod", "start": 22, "end": 39, "loc": { @@ -145,45 +144,30 @@ "name": "__proto__" }, "kind": "get", - "value": { - "type": "FunctionExpression", - "start": 35, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 37, "end": 39, "loc": { "start": { "line": 1, - "column": 35 + "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": [], - "directives": [] - } + "body": [], + "directives": [] } }, { - "type": "Property", + "type": "ObjectMethod", "start": 41, "end": 59, "loc": { @@ -216,58 +200,43 @@ "name": "__proto__" }, "kind": "set", - "value": { - "type": "FunctionExpression", - "start": 54, + "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": 54 + "column": 57 }, "end": { "line": 1, "column": 59 } }, - "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": [] - } + "body": [], + "directives": [] } } ], 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 index c6bdefacea..5fe032f20e 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-getter/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 3, "end": 20, "loc": { @@ -108,11 +108,10 @@ "column": 20 } } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectMethod", "start": 22, "end": 39, "loc": { @@ -145,41 +144,26 @@ "name": "__proto__" }, "kind": "get", - "value": { - "type": "FunctionExpression", - "start": 35, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 37, "end": 39, "loc": { "start": { "line": 1, - "column": 35 + "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ], 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 index f414d0c2e1..2a6d87e4c9 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-method/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 3, "end": 20, "loc": { @@ -108,11 +108,10 @@ "column": 20 } } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectMethod", "start": 22, "end": 35, "loc": { @@ -144,42 +143,27 @@ }, "name": "__proto__" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 31, + "kind": "method", + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 33, "end": 35, "loc": { "start": { "line": 1, - "column": 31 + "column": 33 }, "end": { "line": 1, "column": 35 } }, - "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": [] - } + "body": [], + "directives": [] } } ], 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 index 501fa19f68..d0c7453baa 100644 --- a/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json +++ b/test/fixtures/esprima/es2015-object-initialiser/proto-literal-setter/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 3, "end": 20, "loc": { @@ -108,11 +108,10 @@ "column": 20 } } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectMethod", "start": 22, "end": 40, "loc": { @@ -145,58 +144,43 @@ "name": "__proto__" }, "kind": "set", - "value": { - "type": "FunctionExpression", - "start": 35, + "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": 35 + "column": 38 }, "end": { "line": 1, "column": 40 } }, - "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": [] - } + "body": [], + "directives": [] } } ], 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 index 83f868da39..660265dd75 100644 --- 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 @@ -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,6 +192,7 @@ } } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-object-pattern/elision/expected.json b/test/fixtures/esprima/es2015-object-pattern/elision/expected.json index 6b892f7870..7c4ad06015 100644 --- a/test/fixtures/esprima/es2015-object-pattern/elision/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/elision/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, diff --git a/test/fixtures/esprima/es2015-object-pattern/nested/expected.json b/test/fixtures/esprima/es2015-object-pattern/nested/expected.json index 2b2774d691..91ef151596 100644 --- a/test/fixtures/esprima/es2015-object-pattern/nested/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/nested/expected.json @@ -73,7 +73,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 5, "end": 9, "loc": { @@ -120,8 +120,7 @@ } }, "properties": [] - }, - "kind": "init" + } } ] }, diff --git a/test/fixtures/esprima/es2015-object-pattern/properties/expected.json b/test/fixtures/esprima/es2015-object-pattern/properties/expected.json index a7861a314f..385e1d7b27 100644 --- a/test/fixtures/esprima/es2015-object-pattern/properties/expected.json +++ b/test/fixtures/esprima/es2015-object-pattern/properties/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, @@ -124,7 +123,7 @@ } }, { - "type": "Property", + "type": "ObjectProperty", "start": 7, "end": 10, "loc": { @@ -156,7 +155,6 @@ }, "name": "b" }, - "kind": "init", "value": { "type": "AssignmentPattern", "start": 7, @@ -210,7 +208,7 @@ } }, { - "type": "Property", + "type": "ObjectProperty", "start": 11, "end": 14, "loc": { @@ -257,11 +255,10 @@ } }, "name": "d" - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 15, "end": 20, "loc": { @@ -343,11 +340,10 @@ }, "value": 0 } - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 21, "end": 28, "loc": { @@ -411,8 +407,7 @@ "name": "h" } ] - }, - "kind": "init" + } } ] }, diff --git a/test/fixtures/esprima/es2015-rest-parameter/object-method/expected.json b/test/fixtures/esprima/es2015-rest-parameter/object-method/expected.json index e7736168c6..b5c022b8a6 100644 --- a/test/fixtures/esprima/es2015-rest-parameter/object-method/expected.json +++ b/test/fixtures/esprima/es2015-rest-parameter/object-method/expected.json @@ -89,7 +89,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 6, "end": 29, "loc": { @@ -201,15 +201,16 @@ "column": 29 } }, - "body": [] + "body": [], + "directives": [] } - }, - "kind": "init" + } } ] } } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index aee5d3439b..18295991cb 100644 --- a/test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/expected.json +++ b/test/fixtures/esprima/es2015-rest-parameter/object-shorthand-method/expected.json @@ -89,7 +89,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 6, "end": 25, "loc": { @@ -121,79 +121,66 @@ }, "name": "method" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 12, - "end": 25, - "loc": { - "start": { - "line": 1, - "column": 12 + "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 + } }, - "end": { - "line": 1, - "column": 25 - } - }, - "id": null, - "generator": false, - "expression": false, - "params": [ - { - "type": "RestElement", - "start": 13, + "argument": { + "type": "Identifier", + "start": 16, "end": 20, "loc": { "start": { "line": 1, - "column": 13 + "column": 16 }, "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" - } + "name": "test" } - ], - "body": { - "type": "BlockStatement", - "start": 22, - "end": 25, - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 25 - } - }, - "body": [] } + ], + "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-super-property/invalid_super_access/actual.js b/test/fixtures/esprima/es2015-super-property/.invalid_super_access/actual.js similarity index 100% rename from test/fixtures/esprima/es2015-super-property/invalid_super_access/actual.js rename to test/fixtures/esprima/es2015-super-property/.invalid_super_access/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-super-property/invalid_super_access/options.json rename to test/fixtures/esprima/es2015-super-property/.invalid_super_access/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-super-property/invalid_super_id/actual.js rename to test/fixtures/esprima/es2015-super-property/.invalid_super_id/actual.js 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 similarity index 99% rename from test/fixtures/esprima/es2015-super-property/invalid_super_id/expected.json rename to test/fixtures/esprima/es2015-super-property/.invalid_super_id/expected.json index 9f101bba08..051ec3a5b8 100644 --- a/test/fixtures/esprima/es2015-super-property/invalid_super_id/expected.json +++ b/test/fixtures/esprima/es2015-super-property/.invalid_super_id/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 14, "end": 37, "loc": { 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 similarity index 100% rename from test/fixtures/esprima/es2015-super-property/invalid_super_id/options.json rename to test/fixtures/esprima/es2015-super-property/.invalid_super_id/options.json diff --git a/test/fixtures/esprima/es2015-super-property/arrow_super/expected.json b/test/fixtures/esprima/es2015-super-property/arrow_super/expected.json index b94e426219..76dcbec057 100644 --- a/test/fixtures/esprima/es2015-super-property/arrow_super/expected.json +++ b/test/fixtures/esprima/es2015-super-property/arrow_super/expected.json @@ -90,7 +90,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 24, "end": 67, "loc": { @@ -122,41 +122,41 @@ }, "static": false, "kind": "constructor", - "value": { - "type": "FunctionExpression", - "start": 35, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 38, "end": 67, "loc": { "start": { "line": 2, - "column": 15 + "column": 18 }, "end": { "line": 4, "column": 5 } }, - "id": null, - "generator": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 38, - "end": 67, - "loc": { - "start": { - "line": 2, - "column": 18 + "body": [ + { + "type": "ExpressionStatement", + "start": 48, + "end": 61, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 21 + } }, - "end": { - "line": 4, - "column": 5 - } - }, - "body": [ - { - "type": "ExpressionStatement", + "expression": { + "type": "ArrowFunctionExpression", "start": 48, "end": 61, "loc": { @@ -169,28 +169,28 @@ "column": 21 } }, - "expression": { - "type": "ArrowFunctionExpression", - "start": 48, + "id": null, + "generator": false, + "expression": true, + "params": [], + "body": { + "type": "CallExpression", + "start": 54, "end": 61, "loc": { "start": { "line": 3, - "column": 8 + "column": 14 }, "end": { "line": 3, "column": 21 } }, - "id": null, - "generator": false, - "expression": true, - "params": [], - "body": { - "type": "CallExpression", + "callee": { + "type": "Super", "start": 54, - "end": 61, + "end": 59, "loc": { "start": { "line": 3, @@ -198,35 +198,22 @@ }, "end": { "line": 3, - "column": 21 + "column": 19 } - }, - "callee": { - "type": "Super", - "start": 54, - "end": 59, - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "arguments": [] - } + } + }, + "arguments": [] } } - ] - } + } + ], + "directives": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-super-property/constructor_super/expected.json b/test/fixtures/esprima/es2015-super-property/constructor_super/expected.json index dd99c7bb8e..aad408ba61 100644 --- a/test/fixtures/esprima/es2015-super-property/constructor_super/expected.json +++ b/test/fixtures/esprima/es2015-super-property/constructor_super/expected.json @@ -90,7 +90,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 24, "end": 62, "loc": { @@ -122,43 +122,43 @@ }, "static": false, "kind": "constructor", - "value": { - "type": "FunctionExpression", - "start": 35, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 38, "end": 62, "loc": { "start": { "line": 2, - "column": 15 + "column": 18 }, "end": { "line": 4, "column": 5 } }, - "id": null, - "generator": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 38, - "end": 62, - "loc": { - "start": { - "line": 2, - "column": 18 + "body": [ + { + "type": "ExpressionStatement", + "start": 48, + "end": 56, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 16 + } }, - "end": { - "line": 4, - "column": 5 - } - }, - "body": [ - { - "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", "start": 48, - "end": 56, + "end": 55, "loc": { "start": { "line": 3, @@ -166,13 +166,13 @@ }, "end": { "line": 3, - "column": 16 + "column": 15 } }, - "expression": { - "type": "CallExpression", + "callee": { + "type": "Super", "start": 48, - "end": 55, + "end": 53, "loc": { "start": { "line": 3, @@ -180,34 +180,21 @@ }, "end": { "line": 3, - "column": 15 + "column": 13 } - }, - "callee": { - "type": "Super", - "start": 48, - "end": 53, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "arguments": [] - } + } + }, + "arguments": [] } - ] - } + } + ], + "directives": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-super-property/new_super/expected.json b/test/fixtures/esprima/es2015-super-property/new_super/expected.json index d86a834f70..4bf3b459c2 100644 --- a/test/fixtures/esprima/es2015-super-property/new_super/expected.json +++ b/test/fixtures/esprima/es2015-super-property/new_super/expected.json @@ -90,7 +90,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 24, "end": 61, "loc": { @@ -122,41 +122,41 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 27, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 30, "end": 61, "loc": { "start": { "line": 2, - "column": 7 + "column": 10 }, "end": { "line": 4, "column": 5 } }, - "id": null, - "generator": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 30, - "end": 61, - "loc": { - "start": { - "line": 2, - "column": 10 + "body": [ + { + "type": "ExpressionStatement", + "start": 40, + "end": 55, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 23 + } }, - "end": { - "line": 4, - "column": 5 - } - }, - "body": [ - { - "type": "ExpressionStatement", + "expression": { + "type": "NewExpression", "start": 40, "end": 55, "loc": { @@ -169,77 +169,64 @@ "column": 23 } }, - "expression": { - "type": "NewExpression", - "start": 40, - "end": 55, + "callee": { + "type": "MemberExpression", + "start": 44, + "end": 53, "loc": { "start": { "line": 3, - "column": 8 + "column": 12 }, "end": { "line": 3, - "column": 23 + "column": 21 } }, - "callee": { - "type": "MemberExpression", + "object": { + "type": "Super", "start": 44, - "end": 53, + "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 } }, - "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 + "name": "bar" }, - "arguments": [] - } + "computed": false + }, + "arguments": [] } - ] - } + } + ], + "directives": [] } } ] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-super-property/super_computed/expected.json b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json index fc8eabf3ce..0187540a76 100644 --- a/test/fixtures/esprima/es2015-super-property/super_computed/expected.json +++ b/test/fixtures/esprima/es2015-super-property/super_computed/expected.json @@ -90,7 +90,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 24, "end": 59, "loc": { @@ -122,57 +122,57 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 25, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 28, "end": 59, "loc": { "start": { "line": 2, - "column": 5 + "column": 8 }, "end": { "line": 4, "column": 5 } }, - "id": null, - "generator": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 28, - "end": 59, - "loc": { - "start": { - "line": 2, - "column": 8 + "body": [ + { + "type": "ReturnStatement", + "start": 38, + "end": 53, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 23 + } }, - "end": { - "line": 4, - "column": 5 - } - }, - "body": [ - { - "type": "ReturnStatement", - "start": 38, + "argument": { + "type": "MemberExpression", + "start": 45, "end": 53, "loc": { "start": { "line": 3, - "column": 8 + "column": 15 }, "end": { "line": 3, "column": 23 } }, - "argument": { - "type": "MemberExpression", + "object": { + "type": "Super", "start": 45, - "end": 53, + "end": 50, "loc": { "start": { "line": 3, @@ -180,50 +180,35 @@ }, "end": { "line": 3, - "column": 23 + "column": 20 + } + } + }, + "property": { + "type": "NumberLiteral", + "start": 51, + "end": 52, + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 } }, - "object": { - "type": "Super", - "start": 45, - "end": 50, - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 20 - } - } + "extra": { + "rawValue": 1, + "raw": "1" }, - "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 - } + "value": 1 + }, + "computed": true } - ], - "directives": [] - } + } + ], + "directives": [] } } ] diff --git a/test/fixtures/esprima/es2015-super-property/super_member/expected.json b/test/fixtures/esprima/es2015-super-property/super_member/expected.json index ad4ef9c6c4..9b939e582b 100644 --- a/test/fixtures/esprima/es2015-super-property/super_member/expected.json +++ b/test/fixtures/esprima/es2015-super-property/super_member/expected.json @@ -90,7 +90,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 24, "end": 58, "loc": { @@ -122,108 +122,95 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 25, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 28, "end": 58, "loc": { "start": { "line": 2, - "column": 5 + "column": 8 }, "end": { "line": 4, "column": 5 } }, - "id": null, - "generator": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 28, - "end": 58, - "loc": { - "start": { - "line": 2, - "column": 8 + "body": [ + { + "type": "ReturnStatement", + "start": 38, + "end": 52, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 22 + } }, - "end": { - "line": 4, - "column": 5 - } - }, - "body": [ - { - "type": "ReturnStatement", - "start": 38, + "argument": { + "type": "MemberExpression", + "start": 45, "end": 52, "loc": { "start": { "line": 3, - "column": 8 + "column": 15 }, "end": { "line": 3, "column": 22 } }, - "argument": { - "type": "MemberExpression", + "object": { + "type": "Super", "start": 45, - "end": 52, + "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 } }, - "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 - } + "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 similarity index 100% rename from test/fixtures/esprima/es2015-template-literals/octal-literal/actual.js rename to test/fixtures/esprima/es2015-template-literals/.octal-literal/actual.js diff --git a/test/fixtures/esprima/es2015-template-literals/octal-literal/expected.json b/test/fixtures/esprima/es2015-template-literals/.octal-literal/expected.json similarity index 100% rename from test/fixtures/esprima/es2015-template-literals/octal-literal/expected.json rename to test/fixtures/esprima/es2015-template-literals/.octal-literal/expected.json diff --git a/test/fixtures/esprima/es2015-template-literals/octal-literal/options.json b/test/fixtures/esprima/es2015-template-literals/.octal-literal/options.json similarity index 100% rename from test/fixtures/esprima/es2015-template-literals/octal-literal/options.json rename to test/fixtures/esprima/es2015-template-literals/.octal-literal/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-template-literals/strict-octal-literal/actual.js rename to test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-template-literals/strict-octal-literal/expected.json rename to test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-template-literals/strict-octal-literal/options.json rename to test/fixtures/esprima/es2015-template-literals/.strict-octal-literal/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/actual.js rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/expected.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/options.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-arrow-default/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-name/actual.js rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-name/expected.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-name/options.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-name/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-parameter/actual.js rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-parameter/expected.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-parameter/options.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-parameter/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-rest/actual.js rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-rest/expected.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-rest/options.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-expression-rest/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-parameter/actual.js rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-parameter/expected.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-parameter/options.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-parameter/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-rest/actual.js rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-rest/expected.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-generator-rest/options.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-generator-rest/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/actual.js rename to test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/expected.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/options.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-strict-array-pattern/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/actual.js rename to test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/expected.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/options.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-default/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/actual.js rename to test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/expected.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/options.json rename to test/fixtures/esprima/es2015-yield/.invalid-yield-strict-arrow-parameter-name/options.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/yield-generator-arrow-concise-body/actual.js rename to test/fixtures/esprima/es2015-yield/.yield-generator-arrow-concise-body/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/yield-generator-arrow-concise-body/expected.json rename to test/fixtures/esprima/es2015-yield/.yield-generator-arrow-concise-body/expected.json 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/yield-generator-function-expression/actual.js rename to test/fixtures/esprima/es2015-yield/.yield-generator-function-expression/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/yield-generator-function-parameter/actual.js rename to test/fixtures/esprima/es2015-yield/.yield-generator-function-parameter/actual.js 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 similarity index 100% rename from test/fixtures/esprima/es2015-yield/yield-generator-function-parameter/expected.json rename to test/fixtures/esprima/es2015-yield/.yield-generator-function-parameter/expected.json diff --git a/test/fixtures/esprima/es2015-yield/yield-binding-element/expected.json b/test/fixtures/esprima/es2015-yield/yield-binding-element/expected.json index 350b3f3ac2..09eb1bcbb8 100644 --- a/test/fixtures/esprima/es2015-yield/yield-binding-element/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-binding-element/expected.json @@ -73,7 +73,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 6, "end": 14, "loc": { @@ -120,8 +120,7 @@ } }, "name": "yield" - }, - "kind": "init" + } } ] }, @@ -145,6 +144,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-yield/yield-binding-property/expected.json b/test/fixtures/esprima/es2015-yield/yield-binding-property/expected.json index 65944e5be1..7b85a9fef5 100644 --- a/test/fixtures/esprima/es2015-yield/yield-binding-property/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-binding-property/expected.json @@ -73,7 +73,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 6, "end": 14, "loc": { @@ -120,8 +120,7 @@ } }, "name": "x" - }, - "kind": "init" + } } ] }, @@ -145,6 +144,7 @@ ], "kind": "var" } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json b/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json index dbe92db430..660094298e 100644 --- a/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-generator-method/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 3, "end": 14, "loc": { @@ -90,42 +90,27 @@ }, "name": "yield" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 9, + "kind": "method", + "id": null, + "generator": true, + "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": true, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 12, - "end": 14, - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 14 - } - }, - "body": [], - "directives": [] - } + "body": [], + "directives": [] } } ], 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 index f491ff04fd..b212d5a14f 100644 --- 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 @@ -77,7 +77,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 13, "end": 21, "loc": { @@ -124,8 +124,7 @@ } }, "name": "y" - }, - "kind": "init" + } } ] } @@ -144,9 +143,11 @@ "column": 25 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-yield/yield-method/expected.json b/test/fixtures/esprima/es2015-yield/yield-method/expected.json index 7ef2282cd6..73a6d2827d 100644 --- a/test/fixtures/esprima/es2015-yield/yield-method/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-method/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 3, "end": 13, "loc": { @@ -90,42 +90,27 @@ }, "name": "yield" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 8, + "kind": "method", + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 11, "end": 13, "loc": { "start": { "line": 1, - "column": 8 + "column": 11 }, "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": [] - } + "body": [], + "directives": [] } } ], 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 index 68bee782bd..f0dc7b4f27 100644 --- a/test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-parameter-object-pattern/expected.json @@ -77,7 +77,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 12, "end": 20, "loc": { @@ -124,8 +124,7 @@ } }, "name": "y" - }, - "kind": "init" + } } ] } @@ -144,9 +143,11 @@ "column": 24 } }, - "body": [] + "body": [], + "directives": [] } } - ] + ], + "directives": [] } } \ No newline at end of file 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 index c48e078e6b..687e8f341a 100644 --- a/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-strict-binding-property/expected.json @@ -73,7 +73,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 20, "end": 28, "loc": { @@ -120,8 +120,7 @@ } }, "name": "x" - }, - "kind": "init" + } } ] }, diff --git a/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json b/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json index 2773f3f558..e71a000bbe 100644 --- a/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-strict-method/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectMethod", "start": 17, "end": 27, "loc": { @@ -90,42 +90,27 @@ }, "name": "yield" }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 22, + "kind": "method", + "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ], diff --git a/test/fixtures/esprima/es2015-yield/yield-super-property/expected.json b/test/fixtures/esprima/es2015-yield/yield-super-property/expected.json index 4e179ca792..ef8158ed4e 100644 --- a/test/fixtures/esprima/es2015-yield/yield-super-property/expected.json +++ b/test/fixtures/esprima/es2015-yield/yield-super-property/expected.json @@ -90,7 +90,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 20, "end": 39, "loc": { @@ -122,41 +122,41 @@ }, "static": false, "kind": "method", - "value": { - "type": "FunctionExpression", - "start": 21, + "id": null, + "generator": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 24, "end": 39, "loc": { "start": { "line": 1, - "column": 21 + "column": 24 }, "end": { "line": 1, "column": 39 } }, - "id": null, - "generator": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 24, - "end": 39, - "loc": { - "start": { - "line": 1, - "column": 24 + "body": [ + { + "type": "ExpressionStatement", + "start": 26, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 37 + } }, - "end": { - "line": 1, - "column": 39 - } - }, - "body": [ - { - "type": "ExpressionStatement", + "expression": { + "type": "MemberExpression", "start": 26, "end": 37, "loc": { @@ -169,61 +169,48 @@ "column": 37 } }, - "expression": { - "type": "MemberExpression", + "object": { + "type": "Super", "start": 26, - "end": 37, + "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 } }, - "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 - } + "name": "yield" + }, + "computed": false } - ] - } + } + ], + "directives": [] } } ] } } - ] + ], + "directives": [] } } \ 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 similarity index 100% rename from test/fixtures/esprima/invalid-syntax/GH-1106-09/actual.js rename to test/fixtures/esprima/invalid-syntax/.GH-1106-09/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-09/expected.json b/test/fixtures/esprima/invalid-syntax/.GH-1106-09/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/GH-1106-09/expected.json rename to test/fixtures/esprima/invalid-syntax/.GH-1106-09/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/GH-1106-09/options.json b/test/fixtures/esprima/invalid-syntax/.GH-1106-09/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/GH-1106-09/options.json rename to test/fixtures/esprima/invalid-syntax/.GH-1106-09/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0033/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0033/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0033/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0033/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0033/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0033/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0033/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0033/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0033/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0033/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0033/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0033/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0034/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0034/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0034/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0034/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0034/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0034/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0034/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0034/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0034/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0034/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0034/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0034/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0035/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0035/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0035/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0035/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0035/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0035/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0035/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0035/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0035/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0035/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0035/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0035/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0036/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0036/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0036/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0036/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0036/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0036/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0036/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0036/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0036/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0036/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0036/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0036/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0037/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0037/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0037/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0037/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0037/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0037/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0037/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0037/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0037/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0037/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0037/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0037/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0041/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0041/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0041/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0041/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0041/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0041/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0041/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0041/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0041/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0041/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0041/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0041/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0042/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0042/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0042/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0042/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0042/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0042/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0042/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0042/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0042/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0042/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0042/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0042/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0043/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0043/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0043/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0043/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0043/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0043/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0043/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0043/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0043/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0043/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0043/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0043/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0044/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0044/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0044/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0044/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0044/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0044/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0044/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0044/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0044/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0044/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0044/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0044/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0048/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0048/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0048/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0048/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0048/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0048/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0048/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0048/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0048/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0048/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0048/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0048/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0049/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0049/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0049/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0049/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0049/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0049/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0049/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0049/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0049/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0049/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0049/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0049/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0050/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0050/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0050/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0050/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0050/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0050/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0050/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0050/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0050/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0050/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0050/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0050/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0051/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0051/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0051/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0051/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0051/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0051/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0051/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0051/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0051/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0051/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0051/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0051/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0075/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0075/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0075/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0075/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0075/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0075/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0075/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0075/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0137/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0137/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0137/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0137/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0137/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0137/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0137/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0137/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0137/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0137/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0137/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0137/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0163/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0163/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0163/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0163/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0163/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0163/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0163/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0163/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0163/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0163/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0163/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0163/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0165/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0165/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0165/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0165/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0165/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0165/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0165/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0165/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0165/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0165/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0165/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0165/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0166/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0166/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0166/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0166/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0166/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0166/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0166/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0166/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0166/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0166/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0166/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0166/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0167/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0167/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0167/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0167/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0167/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0167/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0167/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0167/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0167/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0167/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0167/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0167/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0169/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0169/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0169/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0169/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0169/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0169/expected.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0169/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0169/expected.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0169/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0169/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0169/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0169/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0250/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0250/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0250/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0250/actual.js 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 similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0250/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0250/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0277/actual.js b/test/fixtures/esprima/invalid-syntax/.migrated_0277/actual.js similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0277/actual.js rename to test/fixtures/esprima/invalid-syntax/.migrated_0277/actual.js diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0277/expected.json b/test/fixtures/esprima/invalid-syntax/.migrated_0277/expected.json similarity index 98% rename from test/fixtures/esprima/invalid-syntax/migrated_0277/expected.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0277/expected.json index 0fa4cd9032..374479f48a 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0277/expected.json +++ b/test/fixtures/esprima/invalid-syntax/.migrated_0277/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 18, "loc": { diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0277/options.json b/test/fixtures/esprima/invalid-syntax/.migrated_0277/options.json similarity index 100% rename from test/fixtures/esprima/invalid-syntax/migrated_0277/options.json rename to test/fixtures/esprima/invalid-syntax/.migrated_0277/options.json diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0270/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0270/expected.json index 5830cef10e..ee4de023b7 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0270/expected.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0270/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 29, "loc": { diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0271/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0271/expected.json index 6cc3ea74c2..d1b5f89276 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0271/expected.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0271/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 31, "loc": { diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0278/expected.json b/test/fixtures/esprima/invalid-syntax/migrated_0278/expected.json index 966e05ade4..1e47cb6c1c 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0278/expected.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0278/expected.json @@ -75,7 +75,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 9, "end": 28, "loc": { diff --git a/test/fixtures/esprima/statement-if/migrated_0003/actual.js b/test/fixtures/esprima/statement-if/.migrated_0003/actual.js similarity index 100% rename from test/fixtures/esprima/statement-if/migrated_0003/actual.js rename to test/fixtures/esprima/statement-if/.migrated_0003/actual.js diff --git a/test/fixtures/esprima/statement-iteration/migrated_0021/actual.js b/test/fixtures/esprima/statement-iteration/.migrated_0021/actual.js similarity index 100% rename from test/fixtures/esprima/statement-iteration/migrated_0021/actual.js rename to test/fixtures/esprima/statement-iteration/.migrated_0021/actual.js diff --git a/test/fixtures/esprima/statement-iteration/migrated_0021/expected.json b/test/fixtures/esprima/statement-iteration/.migrated_0021/expected.json similarity index 100% rename from test/fixtures/esprima/statement-iteration/migrated_0021/expected.json rename to test/fixtures/esprima/statement-iteration/.migrated_0021/expected.json 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 similarity index 100% rename from test/fixtures/esprima/statement-iteration/pattern-in-for-in/actual.js rename to test/fixtures/esprima/statement-iteration/.pattern-in-for-in/actual.js diff --git a/test/fixtures/esprima/statement-throw/migrated_0002/expected.json b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json index 0ddcce0c63..1586888a8b 100644 --- a/test/fixtures/esprima/statement-throw/migrated_0002/expected.json +++ b/test/fixtures/esprima/statement-throw/migrated_0002/expected.json @@ -58,7 +58,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 8, "end": 24, "loc": { @@ -109,8 +109,7 @@ "raw": "\"Error\"" }, "value": "Error" - }, - "kind": "init" + } } ] } 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/pattern/expected.json b/test/fixtures/experimental/async-functions/pattern/expected.json index 26dffdc586..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, 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 similarity index 100% rename from test/fixtures/experimental/uncategorised/24/options.json rename to test/fixtures/experimental/uncategorised/.24/options.json diff --git a/test/fixtures/experimental/uncategorised/10/expected.json b/test/fixtures/experimental/uncategorised/10/expected.json index a9e67765ef..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, diff --git a/test/fixtures/experimental/uncategorised/11/expected.json b/test/fixtures/experimental/uncategorised/11/expected.json index 5da577c081..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, 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/14/expected.json b/test/fixtures/experimental/uncategorised/14/expected.json index de5cd3bace..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, diff --git a/test/fixtures/experimental/uncategorised/21/expected.json b/test/fixtures/experimental/uncategorised/21/expected.json index d6700e7b80..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": { @@ -140,11 +140,10 @@ "raw": "1" }, "value": 1 - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectMethod", "start": 16, "end": 52, "loc": { @@ -176,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": { @@ -242,42 +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": [] - } + } + ], + "directives": [] } } ] 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/29/expected.json b/test/fixtures/experimental/uncategorised/29/expected.json index 169869cbf6..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,41 +107,27 @@ }, "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, - "params": [], - "body": { - "type": "BlockStatement", - "start": 21, - "end": 23, - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 23 - } - }, - "body": [], - "directives": [] - } + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/experimental/uncategorised/30/expected.json b/test/fixtures/experimental/uncategorised/30/expected.json index 60fc936189..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": { @@ -139,8 +139,7 @@ "raw": "\"test\"" }, "value": "test" - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/experimental/uncategorised/31/expected.json b/test/fixtures/experimental/uncategorised/31/expected.json index 55dbd1960c..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,43 +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": [], - "directives": [] - } + "body": [], + "directives": [] } } ] 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/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/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/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/39/expected.json b/test/fixtures/experimental/uncategorised/39/expected.json index da6ab2aeb4..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": { @@ -188,8 +188,7 @@ "raw": "\"bar\"" }, "value": "bar" - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/experimental/uncategorised/49/expected.json b/test/fixtures/experimental/uncategorised/49/expected.json index 0ca312dba2..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": { @@ -173,8 +173,7 @@ "raw": "'wow'" }, "value": "wow" - }, - "kind": "init" + } } ] } 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/flow/regression/arrow-function-parens-with-return-type/actual.js b/test/fixtures/flow/regression/.arrow-function-parens-with-return-type/actual.js similarity index 100% rename from test/fixtures/flow/regression/arrow-function-parens-with-return-type/actual.js rename to test/fixtures/flow/regression/.arrow-function-parens-with-return-type/actual.js 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 similarity index 100% rename from test/fixtures/flow/regression/arrow-function-parens-with-return-type/expected.json rename to test/fixtures/flow/regression/.arrow-function-parens-with-return-type/expected.json 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 similarity index 100% rename from test/fixtures/flow/regression/arrow-function-parens-with-return-type/options.json rename to test/fixtures/flow/regression/.arrow-function-parens-with-return-type/options.json diff --git a/test/fixtures/flow/regression/issue-2083/expected.json b/test/fixtures/flow/regression/issue-2083/expected.json index f56868b0ee..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,93 +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, - "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": "NumberLiteral", - "start": 34, - "end": 35, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + }, + "cases": [ + { + "type": "SwitchCase", + "start": 45, + "end": 100, "loc": { "start": { - "line": 3, - "column": 12 + "line": 4, + "column": 6 }, "end": { - "line": 3, - "column": 13 + "line": 4, + "column": 61 } }, - "extra": { - "rawValue": 1, - "raw": "1" - }, - "value": 1 - }, - "cases": [ - { - "type": "SwitchCase", - "start": 45, - "end": 100, + "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, @@ -201,120 +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" }, - "extra": { - "parenthesized": true - } + "computed": false + }, + "extra": { + "parenthesized": true } } - ] - } - ], - "directives": [] - } + } + ] + } + ], + "directives": [] } }, { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 114, "end": 162, "loc": { @@ -346,71 +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, - "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, @@ -418,73 +405,58 @@ }, "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": "NumberLiteral", - "start": 144, - "end": 145, - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 23 - } - }, - "extra": { - "rawValue": 4, - "raw": "4" - }, - "value": 4 - }, - "extra": { - "parenthesized": 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": [] - } - ], - "directives": [] - } + "operator": "|", + "right": { + "type": "Identifier", + "start": 149, + "end": 154, + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 32 + } + }, + "name": "typeB" + } + }, + "cases": [] + } + ], + "directives": [] } } ] 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/20/expected.json b/test/fixtures/flow/type-annotations/20/expected.json index 455aaeaa26..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,88 +122,74 @@ "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, - "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": [], - "directives": [] } + ], + "body": { + "type": "BlockStatement", + "start": 28, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/flow/type-annotations/21/expected.json b/test/fixtures/flow/type-annotations/21/expected.json index 3360af33e4..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,118 +122,104 @@ "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, - "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": [], - "directives": [] } + }, + "body": { + "type": "BlockStatement", + "start": 33, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/flow/type-annotations/22/expected.json b/test/fixtures/flow/type-annotations/22/expected.json index 2d660b9f77..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,71 +122,57 @@ "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, - "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/flow/type-annotations/23/expected.json b/test/fixtures/flow/type-annotations/23/expected.json index 75457f8544..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,56 +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, - "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": { @@ -183,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": { @@ -232,75 +234,59 @@ "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": [], - "directives": [] + "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" + } + ] } } ] diff --git a/test/fixtures/flow/type-annotations/24/expected.json b/test/fixtures/flow/type-annotations/24/expected.json index 9990d3f183..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,56 +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, - "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": { @@ -183,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": { @@ -232,75 +234,59 @@ "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": [], - "directives": [] + "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" + } + ] } } ] 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 c59c5c0979..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": { @@ -125,56 +125,58 @@ }, "value": 123 }, - "kind": "init", - "value": { - "type": "FunctionExpression", - "start": 9, - "end": 21, - "loc": { - "start": { - "line": 1, - "column": 9 + "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 + } }, - "end": { - "line": 1, - "column": 21 - } - }, - "id": null, - "generator": false, - "expression": 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": { @@ -187,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": { @@ -236,75 +238,59 @@ "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": [], - "directives": [] + "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" + } + ] } } ] diff --git a/test/fixtures/flow/type-annotations/27/expected.json b/test/fixtures/flow/type-annotations/27/expected.json index 7e23e4be3b..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,88 +107,74 @@ }, "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, - "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": [], - "directives": [] } + ], + "body": { + "type": "BlockStatement", + "start": 36, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/flow/type-annotations/28/expected.json b/test/fixtures/flow/type-annotations/28/expected.json index 23a7b26c0b..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,118 +107,104 @@ }, "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, - "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": [], - "directives": [] } + }, + "body": { + "type": "BlockStatement", + "start": 41, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/flow/type-annotations/29/expected.json b/test/fixtures/flow/type-annotations/29/expected.json index 69dab292da..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,71 +107,57 @@ }, "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, - "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/flow/type-annotations/50/expected.json b/test/fixtures/flow/type-annotations/50/expected.json index 84759bfbc6..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,140 +140,126 @@ }, "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, - "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 } + }, + "argument": { + "type": "NumberLiteral", + "start": 40, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "extra": { + "rawValue": 42, + "raw": "42" + }, + "value": 42 } } - }, - "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, - "loc": { - "start": { - "line": 1, - "column": 33 - }, - "end": { - "line": 1, - "column": 43 - } - }, - "argument": { - "type": "NumberLiteral", - "start": 40, - "end": 42, - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 42 - } - }, - "extra": { - "rawValue": 42, - "raw": "42" - }, - "value": 42 - } - } - ], - "directives": [] - }, - "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" - } - ] - } + ], + "directives": [] } } ] diff --git a/test/fixtures/flow/type-annotations/51/expected.json b/test/fixtures/flow/type-annotations/51/expected.json index be9240f72e..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": { @@ -111,74 +111,60 @@ }, "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, - "params": [], - "body": { - "type": "BlockStatement", - "start": 23, - "end": 26, - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 26 - } - }, - "body": [], - "directives": [] - }, - "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": [] } } ] diff --git a/test/fixtures/flow/type-annotations/56/expected.json b/test/fixtures/flow/type-annotations/56/expected.json index ac710d4778..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,120 +107,106 @@ }, "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, - "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": [], - "directives": [] } + ], + "body": { + "type": "BlockStatement", + "start": 44, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 44 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/flow/type-annotations/60/expected.json b/test/fixtures/flow/type-annotations/60/expected.json index 69d4f65178..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": { @@ -273,8 +272,7 @@ "raw": "\"hello\"" }, "value": "hello" - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/flow/type-annotations/61/expected.json b/test/fixtures/flow/type-annotations/61/expected.json index c09b9c0fec..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": { @@ -273,8 +272,7 @@ "raw": "\"hello\"" }, "value": "hello" - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/flow/type-annotations/63/expected.json b/test/fixtures/flow/type-annotations/63/expected.json index c67a31a154..55cd213628 100644 --- a/test/fixtures/flow/type-annotations/63/expected.json +++ b/test/fixtures/flow/type-annotations/63/expected.json @@ -60,6 +60,7 @@ }, "generator": false, "expression": false, + "async": false, "params": [ { "type": "ObjectPattern", @@ -77,7 +78,7 @@ }, "properties": [ { - "type": "Property", + "type": "ObjectProperty", "start": 14, "end": 15, "loc": { @@ -109,7 +110,6 @@ }, "name": "x" }, - "kind": "init", "value": { "type": "Identifier", "start": 14, diff --git a/test/fixtures/flow/type-annotations/97/expected.json b/test/fixtures/flow/type-annotations/97/expected.json index ad6352b9a0..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": { @@ -107,6 +107,7 @@ "id": null, "generator": false, "expression": false, + "async": false, "typeParameters": { "type": "TypeParameterDeclaration", "start": 14, @@ -158,8 +159,7 @@ "body": [], "directives": [] } - }, - "kind": "init" + } } ], "extra": { diff --git a/test/fixtures/flow/typecasts/2/expected.json b/test/fixtures/flow/typecasts/2/expected.json index 48639097eb..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": { @@ -123,11 +123,10 @@ "raw": "0" }, "value": 0 - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 10, "end": 20, "loc": { @@ -178,8 +177,7 @@ "raw": "\"hey\"" }, "value": "hey" - }, - "kind": "init" + } } ] }, diff --git a/test/fixtures/harmony/computed-properties/call-expression/expected.json b/test/fixtures/harmony/computed-properties/call-expression/expected.json index df195bb3a8..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": { @@ -156,8 +156,7 @@ "raw": "\"\"" }, "value": "" - }, - "kind": "init" + } } ] } 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 similarity index 100% rename from test/fixtures/harmony/uncategorised/335/expected.json rename to test/fixtures/harmony/uncategorised/.335/expected.json 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 similarity index 100% rename from test/fixtures/harmony/uncategorised/343/expected.json rename to test/fixtures/harmony/uncategorised/.343/expected.json 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 similarity index 100% rename from test/fixtures/harmony/uncategorised/349/expected.json rename to test/fixtures/harmony/uncategorised/.349/expected.json 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 similarity index 100% rename from test/fixtures/harmony/uncategorised/353/options.json rename to test/fixtures/harmony/uncategorised/.353/options.json 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/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/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 83a2d03682..2b8ddddaf7 100644 --- a/test/fixtures/harmony/uncategorised/123/expected.json +++ b/test/fixtures/harmony/uncategorised/123/expected.json @@ -89,7 +89,7 @@ }, "body": [ { - "type": "MethodDefinition", + "type": "ClassMethod", "start": 24, "end": 49, "loc": { @@ -121,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": { @@ -168,10 +168,10 @@ "column": 47 } }, - "expression": { - "type": "CallExpression", + "callee": { + "type": "Super", "start": 40, - "end": 47, + "end": 45, "loc": { "start": { "line": 1, @@ -179,30 +179,15 @@ }, "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": [] - } + } + ], + "directives": [] } } ] diff --git a/test/fixtures/harmony/uncategorised/124/expected.json b/test/fixtures/harmony/uncategorised/124/expected.json index b3af6621a1..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": { @@ -111,41 +111,26 @@ }, "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ] 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/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 19d9b17be0..0000000000 --- a/test/fixtures/harmony/uncategorised/130/expected.json +++ /dev/null @@ -1,254 +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": 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": [] - } - } - ], - "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/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/141/expected.json b/test/fixtures/harmony/uncategorised/141/expected.json index 9c4ce67855..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": { @@ -109,8 +109,7 @@ "raw": "10" }, "value": 10 - }, - "kind": "init" + } } ], "extra": { diff --git a/test/fixtures/harmony/uncategorised/142/expected.json b/test/fixtures/harmony/uncategorised/142/expected.json index 6198ec9aa5..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": { @@ -149,8 +149,7 @@ "raw": "10" }, "value": 10 - }, - "kind": "init" + } } ], "extra": { diff --git a/test/fixtures/harmony/uncategorised/143/expected.json b/test/fixtures/harmony/uncategorised/143/expected.json index 01caab9e66..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": { @@ -125,8 +125,7 @@ "body": [], "directives": [] } - }, - "kind": "init" + } } ], "extra": { diff --git a/test/fixtures/harmony/uncategorised/144/expected.json b/test/fixtures/harmony/uncategorised/144/expected.json index 25f8cb97cc..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": { @@ -109,11 +109,10 @@ "raw": "10" }, "value": 10 - }, - "kind": "init" + } }, { - "type": "Property", + "type": "ObjectProperty", "start": 11, "end": 16, "loc": { @@ -164,8 +163,7 @@ "raw": "20" }, "value": 20 - }, - "kind": "init" + } } ], "extra": { diff --git a/test/fixtures/harmony/uncategorised/145/expected.json b/test/fixtures/harmony/uncategorised/145/expected.json index 89a62e0093..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,45 +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": [], - "directives": [] - } + "body": [], + "directives": [] } }, { - "type": "Property", + "type": "ObjectMethod", "start": 16, "end": 29, "loc": { @@ -162,58 +147,43 @@ "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ], diff --git a/test/fixtures/harmony/uncategorised/146/expected.json b/test/fixtures/harmony/uncategorised/146/expected.json index 68e454ca7f..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,42 +90,27 @@ }, "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ], 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/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/153/expected.json b/test/fixtures/harmony/uncategorised/153/expected.json index 5830686c0b..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": { @@ -210,8 +209,7 @@ "raw": "10" }, "value": 10 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/harmony/uncategorised/154/expected.json b/test/fixtures/harmony/uncategorised/154/expected.json index c27822598f..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": { @@ -240,8 +239,7 @@ "raw": "10" }, "value": 10 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/harmony/uncategorised/155/expected.json b/test/fixtures/harmony/uncategorised/155/expected.json index 4892fdd837..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": { @@ -257,8 +256,7 @@ "raw": "10" }, "value": 10 - }, - "kind": "init" + } } ] } @@ -281,8 +279,7 @@ "body": [], "directives": [] } - }, - "kind": "init" + } } ], "extra": { diff --git a/test/fixtures/harmony/uncategorised/156/expected.json b/test/fixtures/harmony/uncategorised/156/expected.json index f918574a30..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,136 +155,116 @@ "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" + "extra": { + "rawValue": 10, + "raw": "10" }, - "value": { - "type": "NumberLiteral", - "start": 14, - "end": 16, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 16 - } - }, - "extra": { - "rawValue": 10, - "raw": "10" - }, - "value": 10 - }, - "kind": "init" + "value": 10 } - ] - } + } + ] } - ], - "body": { - "type": "BlockStatement", - "start": 19, - "end": 21, - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 21 - } - }, - "body": [], - "directives": [] } + ], + "body": { + "type": "BlockStatement", + "start": 19, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "body": [], + "directives": [] } } ], diff --git a/test/fixtures/harmony/uncategorised/157/expected.json b/test/fixtures/harmony/uncategorised/157/expected.json index 519875cdd1..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,136 +170,116 @@ "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" + "extra": { + "rawValue": 10, + "raw": "10" }, - "value": { - "type": "NumberLiteral", - "start": 20, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 22 - } - }, - "extra": { - "rawValue": 10, - "raw": "10" - }, - "value": 10 - }, - "kind": "init" + "value": 10 } - ] - } + } + ] } - ], - "body": { - "type": "BlockStatement", - "start": 25, - "end": 27, - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 27 - } - }, - "body": [], - "directives": [] } + ], + "body": { + "type": "BlockStatement", + "start": 25, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "body": [], + "directives": [] } } ] diff --git a/test/fixtures/harmony/uncategorised/158/expected.json b/test/fixtures/harmony/uncategorised/158/expected.json index 126c8430f4..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": { @@ -209,8 +208,7 @@ "raw": "10" }, "value": 10 - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/harmony/uncategorised/161/expected.json b/test/fixtures/harmony/uncategorised/161/expected.json index 0fdbc8a52e..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": { @@ -208,8 +208,7 @@ "body": [], "directives": [] } - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/harmony/uncategorised/162/expected.json b/test/fixtures/harmony/uncategorised/162/expected.json index 95a9a2ba3e..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,94 +121,79 @@ }, "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" + "extra": { + "rawValue": 1, + "raw": "1" }, - "right": { - "type": "NumberLiteral", - "start": 10, - "end": 11, - "loc": { - "start": { - "line": 1, - "column": 10 - }, - "end": { - "line": 1, - "column": 11 - } - }, - "extra": { - "rawValue": 1, - "raw": "1" - }, - "value": 1 - } + "value": 1 } - ], - "body": { - "type": "BlockStatement", - "start": 13, - "end": 15, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 15 - } - }, - "body": [], - "directives": [] } + ], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "body": [], + "directives": [] } } ] 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/170/expected.json b/test/fixtures/harmony/uncategorised/170/expected.json index 7d82cfb3bb..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, diff --git a/test/fixtures/harmony/uncategorised/173/expected.json b/test/fixtures/harmony/uncategorised/173/expected.json index 870de96929..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,92 +90,77 @@ }, "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ], 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/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/26/expected.json b/test/fixtures/harmony/uncategorised/26/expected.json index a5de31017e..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": { @@ -172,12 +172,10 @@ "raw": "10" }, "value": 10 - }, - "kind": "init" + } } ] - }, - "kind": "init" + } } ] }, 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 fa5a1fed3e..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, diff --git a/test/fixtures/harmony/uncategorised/308/expected.json b/test/fixtures/harmony/uncategorised/308/expected.json index f13152264e..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, diff --git a/test/fixtures/harmony/uncategorised/309/expected.json b/test/fixtures/harmony/uncategorised/309/expected.json index 21ff2e2c8b..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, @@ -238,8 +237,7 @@ } } ] - }, - "kind": "init" + } } ] } diff --git a/test/fixtures/harmony/uncategorised/310/expected.json b/test/fixtures/harmony/uncategorised/310/expected.json index efd6b8cb0f..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, 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/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/33/expected.json b/test/fixtures/harmony/uncategorised/33/expected.json index fbd87bd0c4..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": { @@ -144,8 +144,7 @@ "raw": "42" }, "value": 42 - }, - "kind": "init" + } } ], "extra": { 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/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 e964b38846..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": { @@ -125,42 +125,27 @@ }, "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": [], - "directives": [] - } + "body": [], + "directives": [] } } ] 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/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/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/jsx/basic/10/expected.json b/test/fixtures/jsx/basic/10/expected.json index 7dbf341df0..74329dfd09 100644 --- a/test/fixtures/jsx/basic/10/expected.json +++ b/test/fixtures/jsx/basic/10/expected.json @@ -156,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 ", @@ -187,7 +175,26 @@ } } ] - } + }, + "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 + } + } + } + ] } ] } diff --git a/test/fixtures/jsx/basic/empty-expression-container/expected.json b/test/fixtures/jsx/basic/empty-expression-container/expected.json index 3f1a13918e..157403e9bf 100644 --- a/test/fixtures/jsx/basic/empty-expression-container/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/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/index.js b/test/index.js index 6dc0156769..0954e19df9 100644 --- a/test/index.js +++ b/test/index.js @@ -59,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); } } From 32ef6b465b14fb0abece887a45ef5f3ff6cb6bf0 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 29 Oct 2015 18:02:15 +0000 Subject: [PATCH 30/31] v6.0.0 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fa99ac5b90..4116c272f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babylon", - "version": "5.10.32", + "version": "6.0.0", "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -8,7 +8,7 @@ "repository": "babel/babel", "main": "lib/index.js", "dependencies": { - "babel-runtime": "^5.10.32" + "babel-runtime": "^6.0.0" }, "bin": { "babylon": "./bin/babylon.js" From d7610ef9b05eb231399239ca9dbd39195f921d01 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 29 Oct 2015 18:06:55 +0000 Subject: [PATCH 31/31] v6.0.2 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4116c272f2..da4a2899a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babylon", - "version": "6.0.0", + "version": "6.0.2", "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -8,7 +8,7 @@ "repository": "babel/babel", "main": "lib/index.js", "dependencies": { - "babel-runtime": "^6.0.0" + "babel-runtime": "^6.0.2" }, "bin": { "babylon": "./bin/babylon.js"