diff --git a/package.json b/package.json index 763214dd..ea47831a 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "funding": "https://opencollective.com/eslint", "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.11.3", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.4.1" }, diff --git a/tests/fixtures/ecma-version/6/classes/class-one-method-super.result.js b/tests/fixtures/ecma-version/6/classes/class-one-method-super.result.js index 82ed0891..9c1ac037 100644 --- a/tests/fixtures/ecma-version/6/classes/class-one-method-super.result.js +++ b/tests/fixtures/ecma-version/6/classes/class-one-method-super.result.js @@ -1,587 +1,529 @@ export default { - "type": "Program", - "start": 0, - "end": 64, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 5, - "column": 2 - } - }, - "range": [ - 0, - 64 - ], - "body": [ - { - "type": "ClassDeclaration", - "start": 0, - "end": 63, - "loc": { + "type": "Program", + "loc": { "start": { - "line": 1, - "column": 0 + "line": 1, + "column": 0 }, "end": { - "line": 5, - "column": 1 + "line": 5, + "column": 2 } - }, - "range": [ + }, + "range": [ 0, - 63 - ], - "id": { - "type": "Identifier", - "start": 6, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - }, - "range": [ - 6, - 7 - ], - "name": "A" - }, - "superClass": { - "type": "Identifier", - "start": 16, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "range": [ - 16, - 17 - ], - "name": "B" - }, - "body": { - "type": "ClassBody", - "start": 18, - "end": 63, - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 5, - "column": 1 - } - }, - "range": [ - 18, - 63 - ], - "body": [ - { - "type": "MethodDefinition", - "start": 24, - "end": 61, + 64 + ], + "body": [ + { + "type": "ClassDeclaration", "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 4, - "column": 5 - } - }, - "range": [ - 24, - 61 - ], - "kind": "constructor", - "static": false, - "computed": false, - "key": { - "type": "Identifier", - "start": 24, - "end": 35, - "loc": { "start": { - "line": 2, - "column": 4 + "line": 1, + "column": 0 }, "end": { - "line": 2, - "column": 15 + "line": 5, + "column": 1 } - }, - "range": [ - 24, - 35 - ], - "name": "constructor" }, - "value": { - "type": "FunctionExpression", - "start": 35, - "end": 61, - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 4, - "column": 5 - } - }, - "range": [ - 35, - 61 - ], - "id": null, - "expression": false, - "generator": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 37, - "end": 61, + "range": [ + 0, + 63 + ], + "id": { + "type": "Identifier", "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 4, - "column": 5 - } + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } }, "range": [ - 37, - 61 + 6, + 7 ], - "body": [ - { - "type": "ExpressionStatement", - "start": 47, - "end": 55, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, + "name": "A" + }, + "superClass": { + "type": "Identifier", + "loc": { + "start": { + "line": 1, "column": 16 - } }, - "range": [ - 47, - 55 - ], - "expression": { - "type": "CallExpression", - "start": 47, - "end": 54, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 15 - } - }, - "range": [ - 47, - 54 - ], - "callee": { - "type": "Super", - "start": 47, - "end": 52, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 16, + 17 + ], + "name": "B" + }, + "body": { + "type": "ClassBody", + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "range": [ + 18, + 63 + ], + "body": [ + { + "type": "MethodDefinition", "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } }, "range": [ - 47, - 52 - ] - }, - "arguments": [] + 24, + 61 + ], + "static": false, + "computed": false, + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 24, + 35 + ], + "name": "constructor" + }, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "range": [ + 35, + 61 + ], + "id": null, + "expression": false, + "generator": false, + "params": [], + "body": { + "type": "BlockStatement", + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "range": [ + 37, + 61 + ], + "body": [ + { + "type": "ExpressionStatement", + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 16 + } + }, + "range": [ + 47, + 55 + ], + "expression": { + "type": "CallExpression", + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "range": [ + 47, + 54 + ], + "callee": { + "type": "Super", + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + }, + "range": [ + 47, + 52 + ] + }, + "arguments": [] + } + } + ] + } + } } - } ] - } } - } - ] - } - }, - { - "type": "EmptyStatement", - "start": 63, - "end": 64, - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 2 - } - }, - "range": [ - 63, - 64 - ] - } - ], - "sourceType": "script", - "tokens": [ - { - "type": "Keyword", - "value": "class", - "start": 0, - "end": 5, - "loc": { - "start": { - "line": 1, - "column": 0 }, - "end": { - "line": 1, - "column": 5 + { + "type": "EmptyStatement", + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + }, + "range": [ + 63, + 64 + ] } - }, - "range": [ - 0, - 5 - ] - }, - { - "type": "Identifier", - "value": "A", - "start": 6, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 6 + ], + "sourceType": "script", + "tokens": [ + { + "type": "Keyword", + "value": "class", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "range": [ + 0, + 5 + ] }, - "end": { - "line": 1, - "column": 7 - } - }, - "range": [ - 6, - 7 - ] - }, - { - "type": "Keyword", - "value": "extends", - "start": 8, - "end": 15, - "loc": { - "start": { - "line": 1, - "column": 8 + { + "type": "Identifier", + "value": "A", + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "range": [ + 6, + 7 + ] }, - "end": { - "line": 1, - "column": 15 - } - }, - "range": [ - 8, - 15 - ] - }, - { - "type": "Identifier", - "value": "B", - "start": 16, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 16 + { + "type": "Keyword", + "value": "extends", + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "range": [ + 8, + 15 + ] }, - "end": { - "line": 1, - "column": 17 - } - }, - "range": [ - 16, - 17 - ] - }, - { - "type": "Punctuator", - "value": "{", - "start": 18, - "end": 19, - "loc": { - "start": { - "line": 1, - "column": 18 + { + "type": "Identifier", + "value": "B", + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 16, + 17 + ] }, - "end": { - "line": 1, - "column": 19 - } - }, - "range": [ - 18, - 19 - ] - }, - { - "type": "Identifier", - "value": "constructor", - "start": 24, - "end": 35, - "loc": { - "start": { - "line": 2, - "column": 4 + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "range": [ + 18, + 19 + ] }, - "end": { - "line": 2, - "column": 15 - } - }, - "range": [ - 24, - 35 - ] - }, - { - "type": "Punctuator", - "value": "(", - "start": 35, - "end": 36, - "loc": { - "start": { - "line": 2, - "column": 15 + { + "type": "Identifier", + "value": "constructor", + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 24, + 35 + ] }, - "end": { - "line": 2, - "column": 16 - } - }, - "range": [ - 35, - 36 - ] - }, - { - "type": "Punctuator", - "value": ")", - "start": 36, - "end": 37, - "loc": { - "start": { - "line": 2, - "column": 16 + { + "type": "Punctuator", + "value": "(", + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "range": [ + 35, + 36 + ] }, - "end": { - "line": 2, - "column": 17 - } - }, - "range": [ - 36, - 37 - ] - }, - { - "type": "Punctuator", - "value": "{", - "start": 37, - "end": 38, - "loc": { - "start": { - "line": 2, - "column": 17 + { + "type": "Punctuator", + "value": ")", + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + }, + "range": [ + 36, + 37 + ] }, - "end": { - "line": 2, - "column": 18 - } - }, - "range": [ - 37, - 38 - ] - }, - { - "type": "Keyword", - "value": "super", - "start": 47, - "end": 52, - "loc": { - "start": { - "line": 3, - "column": 8 + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "range": [ + 37, + 38 + ] }, - "end": { - "line": 3, - "column": 13 - } - }, - "range": [ - 47, - 52 - ] - }, - { - "type": "Punctuator", - "value": "(", - "start": 52, - "end": 53, - "loc": { - "start": { - "line": 3, - "column": 13 + { + "type": "Keyword", + "value": "super", + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + }, + "range": [ + 47, + 52 + ] }, - "end": { - "line": 3, - "column": 14 - } - }, - "range": [ - 52, - 53 - ] - }, - { - "type": "Punctuator", - "value": ")", - "start": 53, - "end": 54, - "loc": { - "start": { - "line": 3, - "column": 14 + { + "type": "Punctuator", + "value": "(", + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + }, + "range": [ + 52, + 53 + ] }, - "end": { - "line": 3, - "column": 15 - } - }, - "range": [ - 53, - 54 - ] - }, - { - "type": "Punctuator", - "value": ";", - "start": 54, - "end": 55, - "loc": { - "start": { - "line": 3, - "column": 15 + { + "type": "Punctuator", + "value": ")", + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "range": [ + 53, + 54 + ] }, - "end": { - "line": 3, - "column": 16 - } - }, - "range": [ - 54, - 55 - ] - }, - { - "type": "Punctuator", - "value": "}", - "start": 60, - "end": 61, - "loc": { - "start": { - "line": 4, - "column": 4 + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 16 + } + }, + "range": [ + 54, + 55 + ] }, - "end": { - "line": 4, - "column": 5 - } - }, - "range": [ - 60, - 61 - ] - }, - { - "type": "Punctuator", - "value": "}", - "start": 62, - "end": 63, - "loc": { - "start": { - "line": 5, - "column": 0 + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "range": [ + 60, + 61 + ] }, - "end": { - "line": 5, - "column": 1 - } - }, - "range": [ - 62, - 63 - ] - }, - { - "type": "Punctuator", - "value": ";", - "start": 63, - "end": 64, - "loc": { - "start": { - "line": 5, - "column": 1 + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "range": [ + 62, + 63 + ] }, - "end": { - "line": 5, - "column": 2 + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + }, + "range": [ + 63, + 64 + ] } - }, - "range": [ - 63, - 64 - ] - } - ] + ] }; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/6/forOf/for-of-with-function-initializer.result.js b/tests/fixtures/ecma-version/6/forOf/for-of-with-function-initializer.result.js index f0ada429..b2f8b96a 100644 --- a/tests/fixtures/ecma-version/6/forOf/for-of-with-function-initializer.result.js +++ b/tests/fixtures/ecma-version/6/forOf/for-of-with-function-initializer.result.js @@ -1,6 +1,6 @@ export default { - index: 5, - lineNumber: 1, - column: 6, - message: "for-of loop variable declaration may not have an initializer" -}; + "index": 5, + "lineNumber": 1, + "column": 6, + "message": "for-of loop variable declaration may not have an initializer" +}; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/6/modules/export-default-parenthesized-class.result.js b/tests/fixtures/ecma-version/6/modules/export-default-parenthesized-class.result.js index 951c9311..ff75ca07 100644 --- a/tests/fixtures/ecma-version/6/modules/export-default-parenthesized-class.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-default-parenthesized-class.result.js @@ -1,7 +1,5 @@ export default { "type": "Program", - "start": 0, - "end": 26, "loc": { "start": { "line": 1, @@ -19,8 +17,6 @@ export default { "body": [ { "type": "ExportDefaultDeclaration", - "start": 0, - "end": 26, "loc": { "start": { "line": 1, @@ -37,8 +33,6 @@ export default { ], "declaration": { "type": "ClassExpression", - "start": 16, - "end": 24, "loc": { "start": { "line": 1, @@ -57,8 +51,6 @@ export default { "superClass": null, "body": { "type": "ClassBody", - "start": 22, - "end": 24, "loc": { "start": { "line": 1, @@ -83,8 +75,6 @@ export default { { "type": "Keyword", "value": "export", - "start": 0, - "end": 6, "loc": { "start": { "line": 1, @@ -103,8 +93,6 @@ export default { { "type": "Keyword", "value": "default", - "start": 7, - "end": 14, "loc": { "start": { "line": 1, @@ -123,8 +111,6 @@ export default { { "type": "Punctuator", "value": "(", - "start": 15, - "end": 16, "loc": { "start": { "line": 1, @@ -143,8 +129,6 @@ export default { { "type": "Keyword", "value": "class", - "start": 16, - "end": 21, "loc": { "start": { "line": 1, @@ -163,8 +147,6 @@ export default { { "type": "Punctuator", "value": "{", - "start": 22, - "end": 23, "loc": { "start": { "line": 1, @@ -183,8 +165,6 @@ export default { { "type": "Punctuator", "value": "}", - "start": 23, - "end": 24, "loc": { "start": { "line": 1, @@ -203,8 +183,6 @@ export default { { "type": "Punctuator", "value": ")", - "start": 24, - "end": 25, "loc": { "start": { "line": 1, @@ -223,8 +201,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 25, - "end": 26, "loc": { "start": { "line": 1, @@ -241,4 +217,4 @@ export default { ] } ] -}; +}; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/6/modules/export-default-parenthesized-function.result.js b/tests/fixtures/ecma-version/6/modules/export-default-parenthesized-function.result.js index cbd7a994..e25093fd 100644 --- a/tests/fixtures/ecma-version/6/modules/export-default-parenthesized-function.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-default-parenthesized-function.result.js @@ -1,7 +1,5 @@ export default { "type": "Program", - "start": 0, - "end": 30, "loc": { "start": { "line": 1, @@ -19,8 +17,6 @@ export default { "body": [ { "type": "ExportDefaultDeclaration", - "start": 0, - "end": 30, "loc": { "start": { "line": 1, @@ -37,8 +33,6 @@ export default { ], "declaration": { "type": "FunctionExpression", - "start": 16, - "end": 28, "loc": { "start": { "line": 1, @@ -54,13 +48,11 @@ export default { 28 ], "id": null, - "generator": false, "expression": false, + "generator": false, "params": [], "body": { "type": "BlockStatement", - "start": 26, - "end": 28, "loc": { "start": { "line": 1, @@ -85,8 +77,6 @@ export default { { "type": "Keyword", "value": "export", - "start": 0, - "end": 6, "loc": { "start": { "line": 1, @@ -105,8 +95,6 @@ export default { { "type": "Keyword", "value": "default", - "start": 7, - "end": 14, "loc": { "start": { "line": 1, @@ -125,8 +113,6 @@ export default { { "type": "Punctuator", "value": "(", - "start": 15, - "end": 16, "loc": { "start": { "line": 1, @@ -145,8 +131,6 @@ export default { { "type": "Keyword", "value": "function", - "start": 16, - "end": 24, "loc": { "start": { "line": 1, @@ -165,8 +149,6 @@ export default { { "type": "Punctuator", "value": "(", - "start": 24, - "end": 25, "loc": { "start": { "line": 1, @@ -185,8 +167,6 @@ export default { { "type": "Punctuator", "value": ")", - "start": 25, - "end": 26, "loc": { "start": { "line": 1, @@ -205,8 +185,6 @@ export default { { "type": "Punctuator", "value": "{", - "start": 26, - "end": 27, "loc": { "start": { "line": 1, @@ -225,8 +203,6 @@ export default { { "type": "Punctuator", "value": "}", - "start": 27, - "end": 28, "loc": { "start": { "line": 1, @@ -245,8 +221,6 @@ export default { { "type": "Punctuator", "value": ")", - "start": 28, - "end": 29, "loc": { "start": { "line": 1, @@ -265,8 +239,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 29, - "end": 30, "loc": { "start": { "line": 1, @@ -283,4 +255,4 @@ export default { ] } ] -}; +}; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/6/modules/export-from-default.result.js b/tests/fixtures/ecma-version/6/modules/export-from-default.result.js index 1eb22a76..36172632 100644 --- a/tests/fixtures/ecma-version/6/modules/export-from-default.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-from-default.result.js @@ -147,7 +147,7 @@ export default { ] }, { - "type": "Keyword", + "type": "Identifier", "value": "default", "loc": { "start": { diff --git a/tests/fixtures/ecma-version/6/modules/export-from-named-as-default.result.js b/tests/fixtures/ecma-version/6/modules/export-from-named-as-default.result.js index 2d508f97..7ee7f310 100644 --- a/tests/fixtures/ecma-version/6/modules/export-from-named-as-default.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-from-named-as-default.result.js @@ -183,7 +183,7 @@ export default { ] }, { - "type": "Keyword", + "type": "Identifier", "value": "default", "loc": { "start": { diff --git a/tests/fixtures/ecma-version/6/modules/export-from-named-as-specifiers.result.js b/tests/fixtures/ecma-version/6/modules/export-from-named-as-specifiers.result.js index b8145fb1..5ed135b0 100644 --- a/tests/fixtures/ecma-version/6/modules/export-from-named-as-specifiers.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-from-named-as-specifiers.result.js @@ -236,7 +236,7 @@ export default { ] }, { - "type": "Keyword", + "type": "Identifier", "value": "default", "loc": { "start": { diff --git a/tests/fixtures/ecma-version/6/modules/export-named-as-default.result.js b/tests/fixtures/ecma-version/6/modules/export-named-as-default.result.js index 2e547fb3..126b00fd 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-as-default.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-as-default.result.js @@ -1,7 +1,5 @@ export default { "type": "Program", - "start": 0, - "end": 43, "loc": { "start": { "line": 1, @@ -19,8 +17,6 @@ export default { "body": [ { "type": "VariableDeclaration", - "start": 0, - "end": 18, "loc": { "start": { "line": 1, @@ -38,8 +34,6 @@ export default { "declarations": [ { "type": "VariableDeclarator", - "start": 6, - "end": 17, "loc": { "start": { "line": 1, @@ -56,8 +50,6 @@ export default { ], "id": { "type": "Identifier", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -76,8 +68,6 @@ export default { }, "init": { "type": "Literal", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -101,8 +91,6 @@ export default { }, { "type": "ExportNamedDeclaration", - "start": 19, - "end": 43, "loc": { "start": { "line": 2, @@ -121,8 +109,6 @@ export default { "specifiers": [ { "type": "ExportSpecifier", - "start": 27, - "end": 41, "loc": { "start": { "line": 2, @@ -139,8 +125,6 @@ export default { ], "local": { "type": "Identifier", - "start": 27, - "end": 30, "loc": { "start": { "line": 2, @@ -159,8 +143,6 @@ export default { }, "exported": { "type": "Identifier", - "start": 34, - "end": 41, "loc": { "start": { "line": 2, @@ -187,8 +169,6 @@ export default { { "type": "Keyword", "value": "const", - "start": 0, - "end": 5, "loc": { "start": { "line": 1, @@ -207,8 +187,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -227,8 +205,6 @@ export default { { "type": "Punctuator", "value": "=", - "start": 10, - "end": 11, "loc": { "start": { "line": 1, @@ -247,8 +223,6 @@ export default { { "type": "String", "value": "\"foo\"", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -267,8 +241,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 17, - "end": 18, "loc": { "start": { "line": 1, @@ -287,8 +259,6 @@ export default { { "type": "Keyword", "value": "export", - "start": 19, - "end": 25, "loc": { "start": { "line": 2, @@ -307,8 +277,6 @@ export default { { "type": "Punctuator", "value": "{", - "start": 26, - "end": 27, "loc": { "start": { "line": 2, @@ -327,8 +295,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 27, - "end": 30, "loc": { "start": { "line": 2, @@ -347,8 +313,6 @@ export default { { "type": "Identifier", "value": "as", - "start": 31, - "end": 33, "loc": { "start": { "line": 2, @@ -365,10 +329,8 @@ export default { ] }, { - "type": "Keyword", + "type": "Identifier", "value": "default", - "start": 34, - "end": 41, "loc": { "start": { "line": 2, @@ -387,8 +349,6 @@ export default { { "type": "Punctuator", "value": "}", - "start": 41, - "end": 42, "loc": { "start": { "line": 2, @@ -407,8 +367,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 42, - "end": 43, "loc": { "start": { "line": 2, @@ -425,4 +383,4 @@ export default { ] } ] -}; +}; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/6/modules/export-named-as-specifier.result.js b/tests/fixtures/ecma-version/6/modules/export-named-as-specifier.result.js index f5796ad8..0ea87d9b 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-as-specifier.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-as-specifier.result.js @@ -1,7 +1,5 @@ export default { "type": "Program", - "start": 0, - "end": 39, "loc": { "start": { "line": 1, @@ -19,8 +17,6 @@ export default { "body": [ { "type": "VariableDeclaration", - "start": 0, - "end": 18, "loc": { "start": { "line": 1, @@ -38,8 +34,6 @@ export default { "declarations": [ { "type": "VariableDeclarator", - "start": 6, - "end": 17, "loc": { "start": { "line": 1, @@ -56,8 +50,6 @@ export default { ], "id": { "type": "Identifier", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -76,8 +68,6 @@ export default { }, "init": { "type": "Literal", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -101,8 +91,6 @@ export default { }, { "type": "ExportNamedDeclaration", - "start": 19, - "end": 39, "loc": { "start": { "line": 2, @@ -121,8 +109,6 @@ export default { "specifiers": [ { "type": "ExportSpecifier", - "start": 27, - "end": 37, "loc": { "start": { "line": 2, @@ -139,8 +125,6 @@ export default { ], "local": { "type": "Identifier", - "start": 27, - "end": 30, "loc": { "start": { "line": 2, @@ -159,8 +143,6 @@ export default { }, "exported": { "type": "Identifier", - "start": 34, - "end": 37, "loc": { "start": { "line": 2, @@ -187,8 +169,6 @@ export default { { "type": "Keyword", "value": "const", - "start": 0, - "end": 5, "loc": { "start": { "line": 1, @@ -207,8 +187,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -227,8 +205,6 @@ export default { { "type": "Punctuator", "value": "=", - "start": 10, - "end": 11, "loc": { "start": { "line": 1, @@ -247,8 +223,6 @@ export default { { "type": "String", "value": "\"foo\"", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -267,8 +241,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 17, - "end": 18, "loc": { "start": { "line": 1, @@ -287,8 +259,6 @@ export default { { "type": "Keyword", "value": "export", - "start": 19, - "end": 25, "loc": { "start": { "line": 2, @@ -307,8 +277,6 @@ export default { { "type": "Punctuator", "value": "{", - "start": 26, - "end": 27, "loc": { "start": { "line": 2, @@ -327,8 +295,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 27, - "end": 30, "loc": { "start": { "line": 2, @@ -347,8 +313,6 @@ export default { { "type": "Identifier", "value": "as", - "start": 31, - "end": 33, "loc": { "start": { "line": 2, @@ -367,8 +331,6 @@ export default { { "type": "Identifier", "value": "bar", - "start": 34, - "end": 37, "loc": { "start": { "line": 2, @@ -387,8 +349,6 @@ export default { { "type": "Punctuator", "value": "}", - "start": 37, - "end": 38, "loc": { "start": { "line": 2, @@ -407,8 +367,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 38, - "end": 39, "loc": { "start": { "line": 2, @@ -425,4 +383,4 @@ export default { ] } ] -}; +}; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/6/modules/export-named-as-specifiers.result.js b/tests/fixtures/ecma-version/6/modules/export-named-as-specifiers.result.js index 198745f0..4989d526 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-as-specifiers.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-as-specifiers.result.js @@ -1,7 +1,5 @@ export default { "type": "Program", - "start": 0, - "end": 65, "loc": { "start": { "line": 1, @@ -19,8 +17,6 @@ export default { "body": [ { "type": "VariableDeclaration", - "start": 0, - "end": 35, "loc": { "start": { "line": 1, @@ -38,8 +34,6 @@ export default { "declarations": [ { "type": "VariableDeclarator", - "start": 6, - "end": 17, "loc": { "start": { "line": 1, @@ -56,8 +50,6 @@ export default { ], "id": { "type": "Identifier", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -76,8 +68,6 @@ export default { }, "init": { "type": "Literal", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -98,8 +88,6 @@ export default { }, { "type": "VariableDeclarator", - "start": 23, - "end": 34, "loc": { "start": { "line": 2, @@ -116,8 +104,6 @@ export default { ], "id": { "type": "Identifier", - "start": 23, - "end": 26, "loc": { "start": { "line": 2, @@ -136,8 +122,6 @@ export default { }, "init": { "type": "Literal", - "start": 29, - "end": 34, "loc": { "start": { "line": 2, @@ -161,8 +145,6 @@ export default { }, { "type": "ExportNamedDeclaration", - "start": 36, - "end": 65, "loc": { "start": { "line": 3, @@ -181,8 +163,6 @@ export default { "specifiers": [ { "type": "ExportSpecifier", - "start": 44, - "end": 58, "loc": { "start": { "line": 3, @@ -199,8 +179,6 @@ export default { ], "local": { "type": "Identifier", - "start": 44, - "end": 47, "loc": { "start": { "line": 3, @@ -219,8 +197,6 @@ export default { }, "exported": { "type": "Identifier", - "start": 51, - "end": 58, "loc": { "start": { "line": 3, @@ -240,8 +216,6 @@ export default { }, { "type": "ExportSpecifier", - "start": 60, - "end": 63, "loc": { "start": { "line": 3, @@ -258,8 +232,6 @@ export default { ], "local": { "type": "Identifier", - "start": 60, - "end": 63, "loc": { "start": { "line": 3, @@ -278,8 +250,6 @@ export default { }, "exported": { "type": "Identifier", - "start": 60, - "end": 63, "loc": { "start": { "line": 3, @@ -306,8 +276,6 @@ export default { { "type": "Keyword", "value": "const", - "start": 0, - "end": 5, "loc": { "start": { "line": 1, @@ -326,8 +294,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -346,8 +312,6 @@ export default { { "type": "Punctuator", "value": "=", - "start": 10, - "end": 11, "loc": { "start": { "line": 1, @@ -366,8 +330,6 @@ export default { { "type": "String", "value": "\"foo\"", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -386,8 +348,6 @@ export default { { "type": "Punctuator", "value": ",", - "start": 17, - "end": 18, "loc": { "start": { "line": 1, @@ -406,8 +366,6 @@ export default { { "type": "Identifier", "value": "bar", - "start": 23, - "end": 26, "loc": { "start": { "line": 2, @@ -426,8 +384,6 @@ export default { { "type": "Punctuator", "value": "=", - "start": 27, - "end": 28, "loc": { "start": { "line": 2, @@ -446,8 +402,6 @@ export default { { "type": "String", "value": "\"bar\"", - "start": 29, - "end": 34, "loc": { "start": { "line": 2, @@ -466,8 +420,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 34, - "end": 35, "loc": { "start": { "line": 2, @@ -486,8 +438,6 @@ export default { { "type": "Keyword", "value": "export", - "start": 36, - "end": 42, "loc": { "start": { "line": 3, @@ -506,8 +456,6 @@ export default { { "type": "Punctuator", "value": "{", - "start": 43, - "end": 44, "loc": { "start": { "line": 3, @@ -526,8 +474,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 44, - "end": 47, "loc": { "start": { "line": 3, @@ -546,8 +492,6 @@ export default { { "type": "Identifier", "value": "as", - "start": 48, - "end": 50, "loc": { "start": { "line": 3, @@ -564,10 +508,8 @@ export default { ] }, { - "type": "Keyword", + "type": "Identifier", "value": "default", - "start": 51, - "end": 58, "loc": { "start": { "line": 3, @@ -586,8 +528,6 @@ export default { { "type": "Punctuator", "value": ",", - "start": 58, - "end": 59, "loc": { "start": { "line": 3, @@ -606,8 +546,6 @@ export default { { "type": "Identifier", "value": "bar", - "start": 60, - "end": 63, "loc": { "start": { "line": 3, @@ -626,8 +564,6 @@ export default { { "type": "Punctuator", "value": "}", - "start": 63, - "end": 64, "loc": { "start": { "line": 3, @@ -646,8 +582,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 64, - "end": 65, "loc": { "start": { "line": 3, @@ -664,4 +598,4 @@ export default { ] } ] -}; +}; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/6/modules/export-named-specifier.result.js b/tests/fixtures/ecma-version/6/modules/export-named-specifier.result.js index f7dced9b..077d4a96 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-specifier.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-specifier.result.js @@ -1,7 +1,5 @@ export default { "type": "Program", - "start": 0, - "end": 32, "loc": { "start": { "line": 1, @@ -19,8 +17,6 @@ export default { "body": [ { "type": "VariableDeclaration", - "start": 0, - "end": 18, "loc": { "start": { "line": 1, @@ -38,8 +34,6 @@ export default { "declarations": [ { "type": "VariableDeclarator", - "start": 6, - "end": 17, "loc": { "start": { "line": 1, @@ -56,8 +50,6 @@ export default { ], "id": { "type": "Identifier", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -76,8 +68,6 @@ export default { }, "init": { "type": "Literal", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -101,8 +91,6 @@ export default { }, { "type": "ExportNamedDeclaration", - "start": 19, - "end": 32, "loc": { "start": { "line": 2, @@ -121,8 +109,6 @@ export default { "specifiers": [ { "type": "ExportSpecifier", - "start": 27, - "end": 30, "loc": { "start": { "line": 2, @@ -139,8 +125,6 @@ export default { ], "local": { "type": "Identifier", - "start": 27, - "end": 30, "loc": { "start": { "line": 2, @@ -159,8 +143,6 @@ export default { }, "exported": { "type": "Identifier", - "start": 27, - "end": 30, "loc": { "start": { "line": 2, @@ -187,8 +169,6 @@ export default { { "type": "Keyword", "value": "const", - "start": 0, - "end": 5, "loc": { "start": { "line": 1, @@ -207,8 +187,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -227,8 +205,6 @@ export default { { "type": "Punctuator", "value": "=", - "start": 10, - "end": 11, "loc": { "start": { "line": 1, @@ -247,8 +223,6 @@ export default { { "type": "String", "value": "\"foo\"", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -267,8 +241,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 17, - "end": 18, "loc": { "start": { "line": 1, @@ -287,8 +259,6 @@ export default { { "type": "Keyword", "value": "export", - "start": 19, - "end": 25, "loc": { "start": { "line": 2, @@ -307,8 +277,6 @@ export default { { "type": "Punctuator", "value": "{", - "start": 26, - "end": 27, "loc": { "start": { "line": 2, @@ -327,8 +295,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 27, - "end": 30, "loc": { "start": { "line": 2, @@ -347,8 +313,6 @@ export default { { "type": "Punctuator", "value": "}", - "start": 30, - "end": 31, "loc": { "start": { "line": 2, @@ -367,8 +331,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 31, - "end": 32, "loc": { "start": { "line": 2, @@ -385,4 +347,4 @@ export default { ] } ] -}; +}; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/6/modules/export-named-specifiers-comma.result.js b/tests/fixtures/ecma-version/6/modules/export-named-specifiers-comma.result.js index 50f58d81..4de3fcf6 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-specifiers-comma.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-specifiers-comma.result.js @@ -1,7 +1,5 @@ export default { "type": "Program", - "start": 0, - "end": 55, "loc": { "start": { "line": 1, @@ -19,8 +17,6 @@ export default { "body": [ { "type": "VariableDeclaration", - "start": 0, - "end": 35, "loc": { "start": { "line": 1, @@ -38,8 +34,6 @@ export default { "declarations": [ { "type": "VariableDeclarator", - "start": 6, - "end": 17, "loc": { "start": { "line": 1, @@ -56,8 +50,6 @@ export default { ], "id": { "type": "Identifier", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -76,8 +68,6 @@ export default { }, "init": { "type": "Literal", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -98,8 +88,6 @@ export default { }, { "type": "VariableDeclarator", - "start": 23, - "end": 34, "loc": { "start": { "line": 2, @@ -116,8 +104,6 @@ export default { ], "id": { "type": "Identifier", - "start": 23, - "end": 26, "loc": { "start": { "line": 2, @@ -136,8 +122,6 @@ export default { }, "init": { "type": "Literal", - "start": 29, - "end": 34, "loc": { "start": { "line": 2, @@ -161,8 +145,6 @@ export default { }, { "type": "ExportNamedDeclaration", - "start": 36, - "end": 55, "loc": { "start": { "line": 3, @@ -181,8 +163,6 @@ export default { "specifiers": [ { "type": "ExportSpecifier", - "start": 44, - "end": 47, "loc": { "start": { "line": 3, @@ -199,8 +179,6 @@ export default { ], "local": { "type": "Identifier", - "start": 44, - "end": 47, "loc": { "start": { "line": 3, @@ -219,8 +197,6 @@ export default { }, "exported": { "type": "Identifier", - "start": 44, - "end": 47, "loc": { "start": { "line": 3, @@ -240,8 +216,6 @@ export default { }, { "type": "ExportSpecifier", - "start": 49, - "end": 52, "loc": { "start": { "line": 3, @@ -258,8 +232,6 @@ export default { ], "local": { "type": "Identifier", - "start": 49, - "end": 52, "loc": { "start": { "line": 3, @@ -278,8 +250,6 @@ export default { }, "exported": { "type": "Identifier", - "start": 49, - "end": 52, "loc": { "start": { "line": 3, @@ -306,8 +276,6 @@ export default { { "type": "Keyword", "value": "const", - "start": 0, - "end": 5, "loc": { "start": { "line": 1, @@ -326,8 +294,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -346,8 +312,6 @@ export default { { "type": "Punctuator", "value": "=", - "start": 10, - "end": 11, "loc": { "start": { "line": 1, @@ -366,8 +330,6 @@ export default { { "type": "String", "value": "\"foo\"", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -386,8 +348,6 @@ export default { { "type": "Punctuator", "value": ",", - "start": 17, - "end": 18, "loc": { "start": { "line": 1, @@ -406,8 +366,6 @@ export default { { "type": "Identifier", "value": "bar", - "start": 23, - "end": 26, "loc": { "start": { "line": 2, @@ -426,8 +384,6 @@ export default { { "type": "Punctuator", "value": "=", - "start": 27, - "end": 28, "loc": { "start": { "line": 2, @@ -446,8 +402,6 @@ export default { { "type": "String", "value": "\"bar\"", - "start": 29, - "end": 34, "loc": { "start": { "line": 2, @@ -466,8 +420,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 34, - "end": 35, "loc": { "start": { "line": 2, @@ -486,8 +438,6 @@ export default { { "type": "Keyword", "value": "export", - "start": 36, - "end": 42, "loc": { "start": { "line": 3, @@ -506,8 +456,6 @@ export default { { "type": "Punctuator", "value": "{", - "start": 43, - "end": 44, "loc": { "start": { "line": 3, @@ -526,8 +474,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 44, - "end": 47, "loc": { "start": { "line": 3, @@ -546,8 +492,6 @@ export default { { "type": "Punctuator", "value": ",", - "start": 47, - "end": 48, "loc": { "start": { "line": 3, @@ -566,8 +510,6 @@ export default { { "type": "Identifier", "value": "bar", - "start": 49, - "end": 52, "loc": { "start": { "line": 3, @@ -586,8 +528,6 @@ export default { { "type": "Punctuator", "value": ",", - "start": 52, - "end": 53, "loc": { "start": { "line": 3, @@ -606,8 +546,6 @@ export default { { "type": "Punctuator", "value": "}", - "start": 53, - "end": 54, "loc": { "start": { "line": 3, @@ -626,8 +564,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 54, - "end": 55, "loc": { "start": { "line": 3, @@ -644,4 +580,4 @@ export default { ] } ] -}; +}; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/6/modules/export-named-specifiers.result.js b/tests/fixtures/ecma-version/6/modules/export-named-specifiers.result.js index 45e2296c..eba23f90 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-specifiers.result.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-specifiers.result.js @@ -1,7 +1,5 @@ export default { "type": "Program", - "start": 0, - "end": 54, "loc": { "start": { "line": 1, @@ -19,8 +17,6 @@ export default { "body": [ { "type": "VariableDeclaration", - "start": 0, - "end": 35, "loc": { "start": { "line": 1, @@ -38,8 +34,6 @@ export default { "declarations": [ { "type": "VariableDeclarator", - "start": 6, - "end": 17, "loc": { "start": { "line": 1, @@ -56,8 +50,6 @@ export default { ], "id": { "type": "Identifier", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -76,8 +68,6 @@ export default { }, "init": { "type": "Literal", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -98,8 +88,6 @@ export default { }, { "type": "VariableDeclarator", - "start": 23, - "end": 34, "loc": { "start": { "line": 2, @@ -116,8 +104,6 @@ export default { ], "id": { "type": "Identifier", - "start": 23, - "end": 26, "loc": { "start": { "line": 2, @@ -136,8 +122,6 @@ export default { }, "init": { "type": "Literal", - "start": 29, - "end": 34, "loc": { "start": { "line": 2, @@ -161,8 +145,6 @@ export default { }, { "type": "ExportNamedDeclaration", - "start": 36, - "end": 54, "loc": { "start": { "line": 3, @@ -181,8 +163,6 @@ export default { "specifiers": [ { "type": "ExportSpecifier", - "start": 44, - "end": 47, "loc": { "start": { "line": 3, @@ -199,8 +179,6 @@ export default { ], "local": { "type": "Identifier", - "start": 44, - "end": 47, "loc": { "start": { "line": 3, @@ -219,8 +197,6 @@ export default { }, "exported": { "type": "Identifier", - "start": 44, - "end": 47, "loc": { "start": { "line": 3, @@ -240,8 +216,6 @@ export default { }, { "type": "ExportSpecifier", - "start": 49, - "end": 52, "loc": { "start": { "line": 3, @@ -258,8 +232,6 @@ export default { ], "local": { "type": "Identifier", - "start": 49, - "end": 52, "loc": { "start": { "line": 3, @@ -278,8 +250,6 @@ export default { }, "exported": { "type": "Identifier", - "start": 49, - "end": 52, "loc": { "start": { "line": 3, @@ -306,8 +276,6 @@ export default { { "type": "Keyword", "value": "const", - "start": 0, - "end": 5, "loc": { "start": { "line": 1, @@ -326,8 +294,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 6, - "end": 9, "loc": { "start": { "line": 1, @@ -346,8 +312,6 @@ export default { { "type": "Punctuator", "value": "=", - "start": 10, - "end": 11, "loc": { "start": { "line": 1, @@ -366,8 +330,6 @@ export default { { "type": "String", "value": "\"foo\"", - "start": 12, - "end": 17, "loc": { "start": { "line": 1, @@ -386,8 +348,6 @@ export default { { "type": "Punctuator", "value": ",", - "start": 17, - "end": 18, "loc": { "start": { "line": 1, @@ -406,8 +366,6 @@ export default { { "type": "Identifier", "value": "bar", - "start": 23, - "end": 26, "loc": { "start": { "line": 2, @@ -426,8 +384,6 @@ export default { { "type": "Punctuator", "value": "=", - "start": 27, - "end": 28, "loc": { "start": { "line": 2, @@ -446,8 +402,6 @@ export default { { "type": "String", "value": "\"bar\"", - "start": 29, - "end": 34, "loc": { "start": { "line": 2, @@ -466,8 +420,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 34, - "end": 35, "loc": { "start": { "line": 2, @@ -486,8 +438,6 @@ export default { { "type": "Keyword", "value": "export", - "start": 36, - "end": 42, "loc": { "start": { "line": 3, @@ -506,8 +456,6 @@ export default { { "type": "Punctuator", "value": "{", - "start": 43, - "end": 44, "loc": { "start": { "line": 3, @@ -526,8 +474,6 @@ export default { { "type": "Identifier", "value": "foo", - "start": 44, - "end": 47, "loc": { "start": { "line": 3, @@ -546,8 +492,6 @@ export default { { "type": "Punctuator", "value": ",", - "start": 47, - "end": 48, "loc": { "start": { "line": 3, @@ -566,8 +510,6 @@ export default { { "type": "Identifier", "value": "bar", - "start": 49, - "end": 52, "loc": { "start": { "line": 3, @@ -586,8 +528,6 @@ export default { { "type": "Punctuator", "value": "}", - "start": 52, - "end": 53, "loc": { "start": { "line": 3, @@ -606,8 +546,6 @@ export default { { "type": "Punctuator", "value": ";", - "start": 53, - "end": 54, "loc": { "start": { "line": 3, @@ -624,4 +562,4 @@ export default { ] } ] -}; +}; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/6/modules/import-default-as.result.js b/tests/fixtures/ecma-version/6/modules/import-default-as.result.js index 7708f002..2836c771 100644 --- a/tests/fixtures/ecma-version/6/modules/import-default-as.result.js +++ b/tests/fixtures/ecma-version/6/modules/import-default-as.result.js @@ -146,7 +146,7 @@ export default { ] }, { - "type": "Keyword", + "type": "Identifier", "value": "default", "loc": { "start": { diff --git a/tests/fixtures/ecma-version/6/modules/import-named-as-specifier-keyword.result.js b/tests/fixtures/ecma-version/6/modules/import-named-as-specifier-keyword.result.js index e32c34b6..cc2f913e 100644 --- a/tests/fixtures/ecma-version/6/modules/import-named-as-specifier-keyword.result.js +++ b/tests/fixtures/ecma-version/6/modules/import-named-as-specifier-keyword.result.js @@ -146,7 +146,7 @@ export default { ] }, { - "type": "Keyword", + "type": "Identifier", "value": "var", "loc": { "start": { diff --git a/tests/fixtures/ecma-version/6/modules/import-null-as-nil.result.js b/tests/fixtures/ecma-version/6/modules/import-null-as-nil.result.js index 85d92e54..07bc5a42 100644 --- a/tests/fixtures/ecma-version/6/modules/import-null-as-nil.result.js +++ b/tests/fixtures/ecma-version/6/modules/import-null-as-nil.result.js @@ -146,7 +146,7 @@ export default { ] }, { - "type": "Null", + "type": "Identifier", "value": "null", "loc": { "start": { diff --git a/tests/fixtures/ecma-version/6/modules/valid-await.result.js b/tests/fixtures/ecma-version/6/modules/valid-await.result.js index e3fbfd4e..af16d957 100644 --- a/tests/fixtures/ecma-version/6/modules/valid-await.result.js +++ b/tests/fixtures/ecma-version/6/modules/valid-await.result.js @@ -87,7 +87,7 @@ export default { } } ], - "sourceType": "script", + "sourceType": "module", "tokens": [ { "type": "Identifier", diff --git a/tests/fixtures/ecma-version/6/regexUFlag/regex-u-extended-escape.result.js b/tests/fixtures/ecma-version/6/regexUFlag/regex-u-extended-escape.result.js index 7686eed7..f51e913f 100644 --- a/tests/fixtures/ecma-version/6/regexUFlag/regex-u-extended-escape.result.js +++ b/tests/fixtures/ecma-version/6/regexUFlag/regex-u-extended-escape.result.js @@ -1,5 +1,3 @@ -import conditionalRegex from "../../../../lib/conditional-regex-value.js"; - export default { "type": "Program", "loc": { @@ -68,7 +66,7 @@ export default { ], "name": "x" }, - "init": conditionalRegex({ + "init": { "type": "Literal", "loc": { "start": { @@ -84,13 +82,13 @@ export default { 8, 40 ], - "value": null, + "value": /[\u{0000000000000061}-\u{7A}]/u, "raw": "/[\\u{0000000000000061}-\\u{7A}]/u", "regex": { "pattern": "[\\u{0000000000000061}-\\u{7A}]", "flags": "u" } - }) + } } ], "kind": "var" diff --git a/tests/fixtures/ecma-version/6/regexUFlag/regex-u-simple.result.js b/tests/fixtures/ecma-version/6/regexUFlag/regex-u-simple.result.js index 54fde7cb..c8f2f2b8 100644 --- a/tests/fixtures/ecma-version/6/regexUFlag/regex-u-simple.result.js +++ b/tests/fixtures/ecma-version/6/regexUFlag/regex-u-simple.result.js @@ -1,5 +1,3 @@ -import conditionalRegex from "../../../../lib/conditional-regex-value.js"; - export default { "type": "Program", "loc": { @@ -68,7 +66,7 @@ export default { ], "name": "foo" }, - "init": conditionalRegex({ + "init": { "type": "Literal", "loc": { "start": { @@ -84,13 +82,13 @@ export default { 10, 16 ], - "value": null, + "value": /foo/u, "raw": "/foo/u", "regex": { "pattern": "foo", "flags": "u" } - }) + } } ], "kind": "var" diff --git a/tests/fixtures/ecma-version/6/regexYFlag/regexp-y-simple.result.js b/tests/fixtures/ecma-version/6/regexYFlag/regexp-y-simple.result.js index 88668c13..8f6ba8b3 100644 --- a/tests/fixtures/ecma-version/6/regexYFlag/regexp-y-simple.result.js +++ b/tests/fixtures/ecma-version/6/regexYFlag/regexp-y-simple.result.js @@ -1,5 +1,3 @@ -import conditionalRegex from "../../../../lib/conditional-regex-value.js"; - export default { "type": "Program", "loc": { @@ -68,7 +66,7 @@ export default { ], "name": "foo" }, - "init": conditionalRegex({ + "init": { "type": "Literal", "loc": { "start": { @@ -84,13 +82,13 @@ export default { 10, 16 ], - "value": null, + "value": /foo/y, "raw": "/foo/y", "regex": { "pattern": "foo", "flags": "y" } - }) + } } ], "kind": "var" diff --git a/tests/fixtures/ecma-version/8/modules/async-object-method-keyword.result.js b/tests/fixtures/ecma-version/8/modules/async-object-method-keyword.result.js index d17114a9..3136d449 100644 --- a/tests/fixtures/ecma-version/8/modules/async-object-method-keyword.result.js +++ b/tests/fixtures/ecma-version/8/modules/async-object-method-keyword.result.js @@ -103,8 +103,8 @@ export default { 20 ], "id": null, - "generator": false, "expression": false, + "generator": false, "async": true, "params": [], "body": { @@ -188,7 +188,7 @@ export default { ] }, { - "type": "Keyword", + "type": "Identifier", "value": "delete", "loc": { "start": { @@ -332,4 +332,4 @@ export default { ] } ] -} +}; \ No newline at end of file diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-plain-await.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-plain-await.result.js index 8b4f7c64..9ee40ebe 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-plain-await.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-plain-await.result.js @@ -90,4 +90,4 @@ export default { ] } ] -} \ No newline at end of file +}; \ No newline at end of file