From c40e2fcedf81ff06151e82bdf655d2d0d29e71b8 Mon Sep 17 00:00:00 2001 From: Kai Cataldo Date: Thu, 7 Feb 2019 19:24:18 -0500 Subject: [PATCH] Upgrade: acorn@6.0.7 (#407) --- package.json | 2 +- .../modules/export-named-as-default.result.js | 296 +++++++++-- .../6/modules/export-named-as-default.src.js | 1 + .../export-named-as-specifier.result.js | 296 +++++++++-- .../modules/export-named-as-specifier.src.js | 1 + .../export-named-as-specifiers.result.js | 488 +++++++++++++++--- .../modules/export-named-as-specifiers.src.js | 2 + .../modules/export-named-specifier.result.js | 276 ++++++++-- .../6/modules/export-named-specifier.src.js | 1 + .../export-named-specifiers-comma.result.js | 478 ++++++++++++++--- .../export-named-specifiers-comma.src.js | 2 + .../modules/export-named-specifiers.result.js | 468 ++++++++++++++--- .../6/modules/export-named-specifiers.src.js | 2 + .../6/modules/invalid-await.result.js | 2 +- .../8/modules/async-func.result.js | 2 +- .../8/modules/await-identifier-math.result.js | 2 +- .../invalid-async-await-identifier.result.js | 4 +- .../invalid-async-await-param.result.js | 4 +- ...invalid-async-class-method-await.result.js | 4 +- ...id-async-method-await-identifier.result.js | 4 +- ...invalid-async-method-await-param.result.js | 4 +- .../invalid-async-method-expression.result.js | 4 +- ...nvalid-async-method-return-await.result.js | 4 +- ...invalid-await-arrow-param-parens.result.js | 2 +- .../invalid-await-arrow-param.result.js | 2 +- ...invalid-await-destructured-param.result.js | 2 +- .../invalid-await-func-expression.result.js | 4 +- ...alid-await-identifier-expression.result.js | 4 +- .../invalid-await-identifier.result.js | 4 +- ...t-named-destructured-array-param.result.js | 2 +- ...d-await-named-destructured-param.result.js | 2 +- .../invalid-await-param-expression.result.js | 4 +- .../8/modules/invalid-await-param.result.js | 4 +- .../modules/invalid-await-top-level.result.js | 2 +- .../8/modules/invalid-nested-async.result.js | 4 +- .../8/modules/invalid-plain-await.result.js | 2 +- .../8/modules/plain-await.result.js | 2 +- .../invalid-async-await-identifier.result.js | 4 +- .../invalid-async-await-param.result.js | 4 +- ...invalid-async-class-method-await.result.js | 4 +- ...id-async-method-await-identifier.result.js | 4 +- ...invalid-async-method-await-param.result.js | 4 +- .../invalid-async-method-expression.result.js | 4 +- ...nvalid-async-method-return-await.result.js | 4 +- ...invalid-await-arrow-param-parens.result.js | 4 +- .../invalid-await-arrow-param.result.js | 4 +- ...invalid-await-destructured-param.result.js | 4 +- .../invalid-await-func-expression.result.js | 4 +- ...alid-await-identifier-expression.result.js | 4 +- .../invalid-await-identifier.result.js | 4 +- ...t-named-destructured-array-param.result.js | 4 +- ...d-await-named-destructured-param.result.js | 4 +- .../invalid-await-param-expression.result.js | 4 +- .../not-strict/invalid-await-param.result.js | 4 +- .../not-strict/invalid-nested-async.result.js | 4 +- ...wait-in-nested-function-1.module-result.js | 2 +- ...wait-in-nested-function-2.module-result.js | 2 +- ...wait-in-nested-function-3.module-result.js | 2 +- ...wait-in-nested-function-4.module-result.js | 2 +- ...valid-await-in-nested-function-4.result.js | 2 +- ...valid-yield-in-nested-function-4.result.js | 8 +- 61 files changed, 2081 insertions(+), 396 deletions(-) diff --git a/package.json b/package.json index 12d0ca2e..1102d3fb 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^6.0.2", + "acorn": "^6.0.7", "acorn-jsx": "^5.0.0", "eslint-visitor-keys": "^1.0.0" }, 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 86a57870..abf10295 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,22 +1,26 @@ module.exports = { "type": "Program", + "start": 0, + "end": 43, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 24 } }, "range": [ 0, - 24 + 43 ], "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", + "start": 0, + "end": 18, "loc": { "start": { "line": 1, @@ -24,64 +28,152 @@ module.exports = { }, "end": { "line": 1, - "column": 24 + "column": 18 } }, "range": [ 0, - 24 + 18 + ], + "declarations": [ + { + "type": "VariableDeclarator", + "start": 6, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 6, + 17 + ], + "id": { + "type": "Identifier", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 + ], + "name": "foo" + }, + "init": { + "type": "Literal", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ], + "value": "foo", + "raw": "\"foo\"" + } + } + ], + "kind": "const" + }, + { + "type": "ExportNamedDeclaration", + "start": 19, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 24 + } + }, + "range": [ + 19, + 43 ], "declaration": null, "specifiers": [ { "type": "ExportSpecifier", + "start": 27, + "end": 41, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 22 } }, "range": [ - 8, - 22 + 27, + 41 ], "local": { "type": "Identifier", + "start": 27, + "end": 30, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "range": [ - 8, - 11 + 27, + 30 ], "name": "foo" }, "exported": { "type": "Identifier", + "start": 34, + "end": 41, "loc": { "start": { - "line": 1, + "line": 2, "column": 15 }, "end": { - "line": 1, + "line": 2, "column": 22 } }, "range": [ - 15, - 22 + 34, + 41 ], "name": "default" } @@ -94,7 +186,9 @@ module.exports = { "tokens": [ { "type": "Keyword", - "value": "export", + "value": "const", + "start": 0, + "end": 5, "loc": { "start": { "line": 1, @@ -102,121 +196,233 @@ module.exports = { }, "end": { "line": 1, - "column": 6 + "column": 5 } }, "range": [ 0, - 6 + 5 + ] + }, + { + "type": "Identifier", + "value": "foo", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 ] }, { "type": "Punctuator", - "value": "{", + "value": "=", + "start": 10, + "end": 11, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "range": [ + 10, + 11 + ] + }, + { + "type": "String", + "value": "\"foo\"", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 }, "end": { "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ] + }, + { + "type": "Punctuator", + "value": ";", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "range": [ + 17, + 18 + ] + }, + { + "type": "Keyword", + "value": "export", + "start": 19, + "end": 25, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "range": [ + 19, + 25 + ] + }, + { + "type": "Punctuator", + "value": "{", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, "column": 8 } }, "range": [ - 7, - 8 + 26, + 27 ] }, { "type": "Identifier", "value": "foo", + "start": 27, + "end": 30, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "range": [ - 8, - 11 + 27, + 30 ] }, { "type": "Identifier", "value": "as", + "start": 31, + "end": 33, "loc": { "start": { - "line": 1, + "line": 2, "column": 12 }, "end": { - "line": 1, + "line": 2, "column": 14 } }, "range": [ - 12, - 14 + 31, + 33 ] }, { "type": "Keyword", "value": "default", + "start": 34, + "end": 41, "loc": { "start": { - "line": 1, + "line": 2, "column": 15 }, "end": { - "line": 1, + "line": 2, "column": 22 } }, "range": [ - 15, - 22 + 34, + 41 ] }, { "type": "Punctuator", "value": "}", + "start": 41, + "end": 42, "loc": { "start": { - "line": 1, + "line": 2, "column": 22 }, "end": { - "line": 1, + "line": 2, "column": 23 } }, "range": [ - 22, - 23 + 41, + 42 ] }, { "type": "Punctuator", "value": ";", + "start": 42, + "end": 43, "loc": { "start": { - "line": 1, + "line": 2, "column": 23 }, "end": { - "line": 1, + "line": 2, "column": 24 } }, "range": [ - 23, - 24 + 42, + 43 ] } ] -}; \ No newline at end of file +}; diff --git a/tests/fixtures/ecma-version/6/modules/export-named-as-default.src.js b/tests/fixtures/ecma-version/6/modules/export-named-as-default.src.js index 5d32a24d..9ba5a5a7 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-as-default.src.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-as-default.src.js @@ -1 +1,2 @@ +const foo = "foo"; export {foo as default}; 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 66bf9005..9f7b52e8 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,22 +1,26 @@ module.exports = { "type": "Program", + "start": 0, + "end": 39, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 20 } }, "range": [ 0, - 20 + 39 ], "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", + "start": 0, + "end": 18, "loc": { "start": { "line": 1, @@ -24,64 +28,152 @@ module.exports = { }, "end": { "line": 1, - "column": 20 + "column": 18 } }, "range": [ 0, - 20 + 18 + ], + "declarations": [ + { + "type": "VariableDeclarator", + "start": 6, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 6, + 17 + ], + "id": { + "type": "Identifier", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 + ], + "name": "foo" + }, + "init": { + "type": "Literal", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ], + "value": "foo", + "raw": "\"foo\"" + } + } + ], + "kind": "const" + }, + { + "type": "ExportNamedDeclaration", + "start": 19, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "range": [ + 19, + 39 ], "declaration": null, "specifiers": [ { "type": "ExportSpecifier", + "start": 27, + "end": 37, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 18 } }, "range": [ - 8, - 18 + 27, + 37 ], "local": { "type": "Identifier", + "start": 27, + "end": 30, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "range": [ - 8, - 11 + 27, + 30 ], "name": "foo" }, "exported": { "type": "Identifier", + "start": 34, + "end": 37, "loc": { "start": { - "line": 1, + "line": 2, "column": 15 }, "end": { - "line": 1, + "line": 2, "column": 18 } }, "range": [ - 15, - 18 + 34, + 37 ], "name": "bar" } @@ -94,7 +186,9 @@ module.exports = { "tokens": [ { "type": "Keyword", - "value": "export", + "value": "const", + "start": 0, + "end": 5, "loc": { "start": { "line": 1, @@ -102,121 +196,233 @@ module.exports = { }, "end": { "line": 1, - "column": 6 + "column": 5 } }, "range": [ 0, - 6 + 5 + ] + }, + { + "type": "Identifier", + "value": "foo", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 ] }, { "type": "Punctuator", - "value": "{", + "value": "=", + "start": 10, + "end": 11, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "range": [ + 10, + 11 + ] + }, + { + "type": "String", + "value": "\"foo\"", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 }, "end": { "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ] + }, + { + "type": "Punctuator", + "value": ";", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "range": [ + 17, + 18 + ] + }, + { + "type": "Keyword", + "value": "export", + "start": 19, + "end": 25, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "range": [ + 19, + 25 + ] + }, + { + "type": "Punctuator", + "value": "{", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, "column": 8 } }, "range": [ - 7, - 8 + 26, + 27 ] }, { "type": "Identifier", "value": "foo", + "start": 27, + "end": 30, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "range": [ - 8, - 11 + 27, + 30 ] }, { "type": "Identifier", "value": "as", + "start": 31, + "end": 33, "loc": { "start": { - "line": 1, + "line": 2, "column": 12 }, "end": { - "line": 1, + "line": 2, "column": 14 } }, "range": [ - 12, - 14 + 31, + 33 ] }, { "type": "Identifier", "value": "bar", + "start": 34, + "end": 37, "loc": { "start": { - "line": 1, + "line": 2, "column": 15 }, "end": { - "line": 1, + "line": 2, "column": 18 } }, "range": [ - 15, - 18 + 34, + 37 ] }, { "type": "Punctuator", "value": "}", + "start": 37, + "end": 38, "loc": { "start": { - "line": 1, + "line": 2, "column": 18 }, "end": { - "line": 1, + "line": 2, "column": 19 } }, "range": [ - 18, - 19 + 37, + 38 ] }, { "type": "Punctuator", "value": ";", + "start": 38, + "end": 39, "loc": { "start": { - "line": 1, + "line": 2, "column": 19 }, "end": { - "line": 1, + "line": 2, "column": 20 } }, "range": [ - 19, - 20 + 38, + 39 ] } ] -}; \ No newline at end of file +}; diff --git a/tests/fixtures/ecma-version/6/modules/export-named-as-specifier.src.js b/tests/fixtures/ecma-version/6/modules/export-named-as-specifier.src.js index e7820a6f..a0adcf0c 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-as-specifier.src.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-as-specifier.src.js @@ -1 +1,2 @@ +const foo = "foo"; export {foo as bar}; 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 6ac7d47a..e1d4815c 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,140 +1,298 @@ module.exports = { "type": "Program", + "start": 0, + "end": 65, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 3, "column": 29 } }, "range": [ 0, - 29 + 65 ], "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", + "start": 0, + "end": 35, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 29 + "line": 2, + "column": 16 } }, "range": [ 0, - 29 + 35 + ], + "declarations": [ + { + "type": "VariableDeclarator", + "start": 6, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 6, + 17 + ], + "id": { + "type": "Identifier", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 + ], + "name": "foo" + }, + "init": { + "type": "Literal", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ], + "value": "foo", + "raw": "\"foo\"" + } + }, + { + "type": "VariableDeclarator", + "start": 23, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 23, + 34 + ], + "id": { + "type": "Identifier", + "start": 23, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "range": [ + 23, + 26 + ], + "name": "bar" + }, + "init": { + "type": "Literal", + "start": 29, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 29, + 34 + ], + "value": "bar", + "raw": "\"bar\"" + } + } + ], + "kind": "const" + }, + { + "type": "ExportNamedDeclaration", + "start": 36, + "end": 65, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 29 + } + }, + "range": [ + 36, + 65 ], "declaration": null, "specifiers": [ { "type": "ExportSpecifier", + "start": 44, + "end": 58, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 22 } }, "range": [ - 8, - 22 + 44, + 58 ], "local": { "type": "Identifier", + "start": 44, + "end": 47, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 11 } }, "range": [ - 8, - 11 + 44, + 47 ], "name": "foo" }, "exported": { "type": "Identifier", + "start": 51, + "end": 58, "loc": { "start": { - "line": 1, + "line": 3, "column": 15 }, "end": { - "line": 1, + "line": 3, "column": 22 } }, "range": [ - 15, - 22 + 51, + 58 ], "name": "default" } }, { "type": "ExportSpecifier", + "start": 60, + "end": 63, "loc": { "start": { - "line": 1, + "line": 3, "column": 24 }, "end": { - "line": 1, + "line": 3, "column": 27 } }, "range": [ - 24, - 27 + 60, + 63 ], "local": { "type": "Identifier", + "start": 60, + "end": 63, "loc": { "start": { - "line": 1, + "line": 3, "column": 24 }, "end": { - "line": 1, + "line": 3, "column": 27 } }, "range": [ - 24, - 27 + 60, + 63 ], "name": "bar" }, "exported": { "type": "Identifier", + "start": 60, + "end": 63, "loc": { "start": { - "line": 1, + "line": 3, "column": 24 }, "end": { - "line": 1, + "line": 3, "column": 27 } }, "range": [ - 24, - 27 + 60, + 63 ], "name": "bar" } @@ -147,7 +305,9 @@ module.exports = { "tokens": [ { "type": "Keyword", - "value": "export", + "value": "const", + "start": 0, + "end": 5, "loc": { "start": { "line": 1, @@ -155,157 +315,353 @@ module.exports = { }, "end": { "line": 1, - "column": 6 + "column": 5 } }, "range": [ 0, - 6 + 5 + ] + }, + { + "type": "Identifier", + "value": "foo", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 ] }, { "type": "Punctuator", - "value": "{", + "value": "=", + "start": 10, + "end": 11, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "range": [ + 10, + 11 + ] + }, + { + "type": "String", + "value": "\"foo\"", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 }, "end": { "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ] + }, + { + "type": "Punctuator", + "value": ",", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "range": [ + 17, + 18 + ] + }, + { + "type": "Identifier", + "value": "bar", + "start": 23, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "range": [ + 23, + 26 + ] + }, + { + "type": "Punctuator", + "value": "=", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 2, "column": 8 + }, + "end": { + "line": 2, + "column": 9 } }, "range": [ - 7, - 8 + 27, + 28 + ] + }, + { + "type": "String", + "value": "\"bar\"", + "start": 29, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 29, + 34 + ] + }, + { + "type": "Punctuator", + "value": ";", + "start": 34, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "range": [ + 34, + 35 + ] + }, + { + "type": "Keyword", + "value": "export", + "start": 36, + "end": 42, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + }, + "range": [ + 36, + 42 + ] + }, + { + "type": "Punctuator", + "value": "{", + "start": 43, + "end": 44, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + }, + "range": [ + 43, + 44 ] }, { "type": "Identifier", "value": "foo", + "start": 44, + "end": 47, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 11 } }, "range": [ - 8, - 11 + 44, + 47 ] }, { "type": "Identifier", "value": "as", + "start": 48, + "end": 50, "loc": { "start": { - "line": 1, + "line": 3, "column": 12 }, "end": { - "line": 1, + "line": 3, "column": 14 } }, "range": [ - 12, - 14 + 48, + 50 ] }, { "type": "Keyword", "value": "default", + "start": 51, + "end": 58, "loc": { "start": { - "line": 1, + "line": 3, "column": 15 }, "end": { - "line": 1, + "line": 3, "column": 22 } }, "range": [ - 15, - 22 + 51, + 58 ] }, { "type": "Punctuator", "value": ",", + "start": 58, + "end": 59, "loc": { "start": { - "line": 1, + "line": 3, "column": 22 }, "end": { - "line": 1, + "line": 3, "column": 23 } }, "range": [ - 22, - 23 + 58, + 59 ] }, { "type": "Identifier", "value": "bar", + "start": 60, + "end": 63, "loc": { "start": { - "line": 1, + "line": 3, "column": 24 }, "end": { - "line": 1, + "line": 3, "column": 27 } }, "range": [ - 24, - 27 + 60, + 63 ] }, { "type": "Punctuator", "value": "}", + "start": 63, + "end": 64, "loc": { "start": { - "line": 1, + "line": 3, "column": 27 }, "end": { - "line": 1, + "line": 3, "column": 28 } }, "range": [ - 27, - 28 + 63, + 64 ] }, { "type": "Punctuator", "value": ";", + "start": 64, + "end": 65, "loc": { "start": { - "line": 1, + "line": 3, "column": 28 }, "end": { - "line": 1, + "line": 3, "column": 29 } }, "range": [ - 28, - 29 + 64, + 65 ] } ] -}; \ No newline at end of file +}; diff --git a/tests/fixtures/ecma-version/6/modules/export-named-as-specifiers.src.js b/tests/fixtures/ecma-version/6/modules/export-named-as-specifiers.src.js index ff579278..5b6a5974 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-as-specifiers.src.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-as-specifiers.src.js @@ -1 +1,3 @@ +const foo = "foo", + bar = "bar"; export {foo as default, bar}; 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 05e6245e..51206a66 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,22 +1,26 @@ module.exports = { "type": "Program", + "start": 0, + "end": 32, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 13 } }, "range": [ 0, - 13 + 32 ], "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", + "start": 0, + "end": 18, "loc": { "start": { "line": 1, @@ -24,64 +28,152 @@ module.exports = { }, "end": { "line": 1, - "column": 13 + "column": 18 } }, "range": [ 0, - 13 + 18 + ], + "declarations": [ + { + "type": "VariableDeclarator", + "start": 6, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 6, + 17 + ], + "id": { + "type": "Identifier", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 + ], + "name": "foo" + }, + "init": { + "type": "Literal", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ], + "value": "foo", + "raw": "\"foo\"" + } + } + ], + "kind": "const" + }, + { + "type": "ExportNamedDeclaration", + "start": 19, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "range": [ + 19, + 32 ], "declaration": null, "specifiers": [ { "type": "ExportSpecifier", + "start": 27, + "end": 30, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "range": [ - 8, - 11 + 27, + 30 ], "local": { "type": "Identifier", + "start": 27, + "end": 30, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "range": [ - 8, - 11 + 27, + 30 ], "name": "foo" }, "exported": { "type": "Identifier", + "start": 27, + "end": 30, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "range": [ - 8, - 11 + 27, + 30 ], "name": "foo" } @@ -94,7 +186,9 @@ module.exports = { "tokens": [ { "type": "Keyword", - "value": "export", + "value": "const", + "start": 0, + "end": 5, "loc": { "start": { "line": 1, @@ -102,85 +196,193 @@ module.exports = { }, "end": { "line": 1, - "column": 6 + "column": 5 } }, "range": [ 0, - 6 + 5 + ] + }, + { + "type": "Identifier", + "value": "foo", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 ] }, { "type": "Punctuator", - "value": "{", + "value": "=", + "start": 10, + "end": 11, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "range": [ + 10, + 11 + ] + }, + { + "type": "String", + "value": "\"foo\"", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ] + }, + { + "type": "Punctuator", + "value": ";", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 }, "end": { "line": 1, + "column": 18 + } + }, + "range": [ + 17, + 18 + ] + }, + { + "type": "Keyword", + "value": "export", + "start": 19, + "end": 25, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "range": [ + 19, + 25 + ] + }, + { + "type": "Punctuator", + "value": "{", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, "column": 8 } }, "range": [ - 7, - 8 + 26, + 27 ] }, { "type": "Identifier", "value": "foo", + "start": 27, + "end": 30, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "range": [ - 8, - 11 + 27, + 30 ] }, { "type": "Punctuator", "value": "}", + "start": 30, + "end": 31, "loc": { "start": { - "line": 1, + "line": 2, "column": 11 }, "end": { - "line": 1, + "line": 2, "column": 12 } }, "range": [ - 11, - 12 + 30, + 31 ] }, { "type": "Punctuator", "value": ";", + "start": 31, + "end": 32, "loc": { "start": { - "line": 1, + "line": 2, "column": 12 }, "end": { - "line": 1, + "line": 2, "column": 13 } }, "range": [ - 12, - 13 + 31, + 32 ] } ] -}; \ No newline at end of file +}; diff --git a/tests/fixtures/ecma-version/6/modules/export-named-specifier.src.js b/tests/fixtures/ecma-version/6/modules/export-named-specifier.src.js index df5f5e60..67eb3c94 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-specifier.src.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-specifier.src.js @@ -1 +1,2 @@ +const foo = "foo"; export {foo}; 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 75467b13..54c9cbef 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,140 +1,298 @@ module.exports = { "type": "Program", + "start": 0, + "end": 55, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 3, "column": 19 } }, "range": [ 0, - 19 + 55 ], "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", + "start": 0, + "end": 35, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 19 + "line": 2, + "column": 16 } }, "range": [ 0, - 19 + 35 + ], + "declarations": [ + { + "type": "VariableDeclarator", + "start": 6, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 6, + 17 + ], + "id": { + "type": "Identifier", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 + ], + "name": "foo" + }, + "init": { + "type": "Literal", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ], + "value": "foo", + "raw": "\"foo\"" + } + }, + { + "type": "VariableDeclarator", + "start": 23, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 23, + 34 + ], + "id": { + "type": "Identifier", + "start": 23, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "range": [ + 23, + 26 + ], + "name": "bar" + }, + "init": { + "type": "Literal", + "start": 29, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 29, + 34 + ], + "value": "bar", + "raw": "\"bar\"" + } + } + ], + "kind": "const" + }, + { + "type": "ExportNamedDeclaration", + "start": 36, + "end": 55, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 19 + } + }, + "range": [ + 36, + 55 ], "declaration": null, "specifiers": [ { "type": "ExportSpecifier", + "start": 44, + "end": 47, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 11 } }, "range": [ - 8, - 11 + 44, + 47 ], "local": { "type": "Identifier", + "start": 44, + "end": 47, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 11 } }, "range": [ - 8, - 11 + 44, + 47 ], "name": "foo" }, "exported": { "type": "Identifier", + "start": 44, + "end": 47, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 11 } }, "range": [ - 8, - 11 + 44, + 47 ], "name": "foo" } }, { "type": "ExportSpecifier", + "start": 49, + "end": 52, "loc": { "start": { - "line": 1, + "line": 3, "column": 13 }, "end": { - "line": 1, + "line": 3, "column": 16 } }, "range": [ - 13, - 16 + 49, + 52 ], "local": { "type": "Identifier", + "start": 49, + "end": 52, "loc": { "start": { - "line": 1, + "line": 3, "column": 13 }, "end": { - "line": 1, + "line": 3, "column": 16 } }, "range": [ - 13, - 16 + 49, + 52 ], "name": "bar" }, "exported": { "type": "Identifier", + "start": 49, + "end": 52, "loc": { "start": { - "line": 1, + "line": 3, "column": 13 }, "end": { - "line": 1, + "line": 3, "column": 16 } }, "range": [ - 13, - 16 + 49, + 52 ], "name": "bar" } @@ -147,7 +305,9 @@ module.exports = { "tokens": [ { "type": "Keyword", - "value": "export", + "value": "const", + "start": 0, + "end": 5, "loc": { "start": { "line": 1, @@ -155,139 +315,333 @@ module.exports = { }, "end": { "line": 1, - "column": 6 + "column": 5 } }, "range": [ 0, - 6 + 5 + ] + }, + { + "type": "Identifier", + "value": "foo", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 ] }, { "type": "Punctuator", - "value": "{", + "value": "=", + "start": 10, + "end": 11, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "range": [ + 10, + 11 + ] + }, + { + "type": "String", + "value": "\"foo\"", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 }, "end": { "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ] + }, + { + "type": "Punctuator", + "value": ",", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "range": [ + 17, + 18 + ] + }, + { + "type": "Identifier", + "value": "bar", + "start": 23, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "range": [ + 23, + 26 + ] + }, + { + "type": "Punctuator", + "value": "=", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 2, "column": 8 + }, + "end": { + "line": 2, + "column": 9 } }, "range": [ - 7, - 8 + 27, + 28 + ] + }, + { + "type": "String", + "value": "\"bar\"", + "start": 29, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 29, + 34 + ] + }, + { + "type": "Punctuator", + "value": ";", + "start": 34, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "range": [ + 34, + 35 + ] + }, + { + "type": "Keyword", + "value": "export", + "start": 36, + "end": 42, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + }, + "range": [ + 36, + 42 + ] + }, + { + "type": "Punctuator", + "value": "{", + "start": 43, + "end": 44, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + }, + "range": [ + 43, + 44 ] }, { "type": "Identifier", "value": "foo", + "start": 44, + "end": 47, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 11 } }, "range": [ - 8, - 11 + 44, + 47 ] }, { "type": "Punctuator", "value": ",", + "start": 47, + "end": 48, "loc": { "start": { - "line": 1, + "line": 3, "column": 11 }, "end": { - "line": 1, + "line": 3, "column": 12 } }, "range": [ - 11, - 12 + 47, + 48 ] }, { "type": "Identifier", "value": "bar", + "start": 49, + "end": 52, "loc": { "start": { - "line": 1, + "line": 3, "column": 13 }, "end": { - "line": 1, + "line": 3, "column": 16 } }, "range": [ - 13, - 16 + 49, + 52 ] }, { "type": "Punctuator", "value": ",", + "start": 52, + "end": 53, "loc": { "start": { - "line": 1, + "line": 3, "column": 16 }, "end": { - "line": 1, + "line": 3, "column": 17 } }, "range": [ - 16, - 17 + 52, + 53 ] }, { "type": "Punctuator", "value": "}", + "start": 53, + "end": 54, "loc": { "start": { - "line": 1, + "line": 3, "column": 17 }, "end": { - "line": 1, + "line": 3, "column": 18 } }, "range": [ - 17, - 18 + 53, + 54 ] }, { "type": "Punctuator", "value": ";", + "start": 54, + "end": 55, "loc": { "start": { - "line": 1, + "line": 3, "column": 18 }, "end": { - "line": 1, + "line": 3, "column": 19 } }, "range": [ - 18, - 19 + 54, + 55 ] } ] -}; \ No newline at end of file +}; diff --git a/tests/fixtures/ecma-version/6/modules/export-named-specifiers-comma.src.js b/tests/fixtures/ecma-version/6/modules/export-named-specifiers-comma.src.js index 61bc40fd..6426b6a3 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-specifiers-comma.src.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-specifiers-comma.src.js @@ -1 +1,3 @@ +const foo = "foo", + bar = "bar"; export {foo, bar,}; 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 eec1bef7..fb501f0a 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,140 +1,298 @@ module.exports = { "type": "Program", + "start": 0, + "end": 54, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 3, "column": 18 } }, "range": [ 0, - 18 + 54 ], "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", + "start": 0, + "end": 35, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 18 + "line": 2, + "column": 16 } }, "range": [ 0, - 18 + 35 + ], + "declarations": [ + { + "type": "VariableDeclarator", + "start": 6, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 6, + 17 + ], + "id": { + "type": "Identifier", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 + ], + "name": "foo" + }, + "init": { + "type": "Literal", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ], + "value": "foo", + "raw": "\"foo\"" + } + }, + { + "type": "VariableDeclarator", + "start": 23, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 23, + 34 + ], + "id": { + "type": "Identifier", + "start": 23, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "range": [ + 23, + 26 + ], + "name": "bar" + }, + "init": { + "type": "Literal", + "start": 29, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 29, + 34 + ], + "value": "bar", + "raw": "\"bar\"" + } + } + ], + "kind": "const" + }, + { + "type": "ExportNamedDeclaration", + "start": 36, + "end": 54, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 18 + } + }, + "range": [ + 36, + 54 ], "declaration": null, "specifiers": [ { "type": "ExportSpecifier", + "start": 44, + "end": 47, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 11 } }, "range": [ - 8, - 11 + 44, + 47 ], "local": { "type": "Identifier", + "start": 44, + "end": 47, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 11 } }, "range": [ - 8, - 11 + 44, + 47 ], "name": "foo" }, "exported": { "type": "Identifier", + "start": 44, + "end": 47, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 11 } }, "range": [ - 8, - 11 + 44, + 47 ], "name": "foo" } }, { "type": "ExportSpecifier", + "start": 49, + "end": 52, "loc": { "start": { - "line": 1, + "line": 3, "column": 13 }, "end": { - "line": 1, + "line": 3, "column": 16 } }, "range": [ - 13, - 16 + 49, + 52 ], "local": { "type": "Identifier", + "start": 49, + "end": 52, "loc": { "start": { - "line": 1, + "line": 3, "column": 13 }, "end": { - "line": 1, + "line": 3, "column": 16 } }, "range": [ - 13, - 16 + 49, + 52 ], "name": "bar" }, "exported": { "type": "Identifier", + "start": 49, + "end": 52, "loc": { "start": { - "line": 1, + "line": 3, "column": 13 }, "end": { - "line": 1, + "line": 3, "column": 16 } }, "range": [ - 13, - 16 + 49, + 52 ], "name": "bar" } @@ -147,7 +305,9 @@ module.exports = { "tokens": [ { "type": "Keyword", - "value": "export", + "value": "const", + "start": 0, + "end": 5, "loc": { "start": { "line": 1, @@ -155,121 +315,313 @@ module.exports = { }, "end": { "line": 1, - "column": 6 + "column": 5 } }, "range": [ 0, - 6 + 5 + ] + }, + { + "type": "Identifier", + "value": "foo", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "range": [ + 6, + 9 ] }, { "type": "Punctuator", - "value": "{", + "value": "=", + "start": 10, + "end": 11, "loc": { "start": { "line": 1, - "column": 7 + "column": 10 }, "end": { "line": 1, + "column": 11 + } + }, + "range": [ + 10, + 11 + ] + }, + { + "type": "String", + "value": "\"foo\"", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "range": [ + 12, + 17 + ] + }, + { + "type": "Punctuator", + "value": ",", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "range": [ + 17, + 18 + ] + }, + { + "type": "Identifier", + "value": "bar", + "start": 23, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "range": [ + 23, + 26 + ] + }, + { + "type": "Punctuator", + "value": "=", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + }, + "range": [ + 27, + 28 + ] + }, + { + "type": "String", + "value": "\"bar\"", + "start": 29, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "range": [ + 29, + 34 + ] + }, + { + "type": "Punctuator", + "value": ";", + "start": 34, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "range": [ + 34, + 35 + ] + }, + { + "type": "Keyword", + "value": "export", + "start": 36, + "end": 42, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + }, + "range": [ + 36, + 42 + ] + }, + { + "type": "Punctuator", + "value": "{", + "start": 43, + "end": 44, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, "column": 8 } }, "range": [ - 7, - 8 + 43, + 44 ] }, { "type": "Identifier", "value": "foo", + "start": 44, + "end": 47, "loc": { "start": { - "line": 1, + "line": 3, "column": 8 }, "end": { - "line": 1, + "line": 3, "column": 11 } }, "range": [ - 8, - 11 + 44, + 47 ] }, { "type": "Punctuator", "value": ",", + "start": 47, + "end": 48, "loc": { "start": { - "line": 1, + "line": 3, "column": 11 }, "end": { - "line": 1, + "line": 3, "column": 12 } }, "range": [ - 11, - 12 + 47, + 48 ] }, { "type": "Identifier", "value": "bar", + "start": 49, + "end": 52, "loc": { "start": { - "line": 1, + "line": 3, "column": 13 }, "end": { - "line": 1, + "line": 3, "column": 16 } }, "range": [ - 13, - 16 + 49, + 52 ] }, { "type": "Punctuator", "value": "}", + "start": 52, + "end": 53, "loc": { "start": { - "line": 1, + "line": 3, "column": 16 }, "end": { - "line": 1, + "line": 3, "column": 17 } }, "range": [ - 16, - 17 + 52, + 53 ] }, { "type": "Punctuator", "value": ";", + "start": 53, + "end": 54, "loc": { "start": { - "line": 1, + "line": 3, "column": 17 }, "end": { - "line": 1, + "line": 3, "column": 18 } }, "range": [ - 17, - 18 + 53, + 54 ] } ] -}; \ No newline at end of file +}; diff --git a/tests/fixtures/ecma-version/6/modules/export-named-specifiers.src.js b/tests/fixtures/ecma-version/6/modules/export-named-specifiers.src.js index fdbc9427..60c04fa8 100644 --- a/tests/fixtures/ecma-version/6/modules/export-named-specifiers.src.js +++ b/tests/fixtures/ecma-version/6/modules/export-named-specifiers.src.js @@ -1 +1,3 @@ +const foo = "foo", + bar = "bar"; export {foo, bar}; diff --git a/tests/fixtures/ecma-version/6/modules/invalid-await.result.js b/tests/fixtures/ecma-version/6/modules/invalid-await.result.js index e57bc42a..bb1beebe 100644 --- a/tests/fixtures/ecma-version/6/modules/invalid-await.result.js +++ b/tests/fixtures/ecma-version/6/modules/invalid-await.result.js @@ -2,5 +2,5 @@ module.exports = { "index": 11, "lineNumber": 1, "column": 12, - "message": "Can not use keyword 'await' outside an async function" + "message": "Cannot use keyword 'await' outside an async function" }; diff --git a/tests/fixtures/ecma-version/8/modules/async-func.result.js b/tests/fixtures/ecma-version/8/modules/async-func.result.js index 16dceb4a..a0785833 100644 --- a/tests/fixtures/ecma-version/8/modules/async-func.result.js +++ b/tests/fixtures/ecma-version/8/modules/async-func.result.js @@ -1,5 +1,5 @@ module.exports = { - "message": "Can not use keyword 'await' outside an async function", + "message": "Cannot use keyword 'await' outside an async function", "column": 8, "index": 7, "lineNumber": 1 diff --git a/tests/fixtures/ecma-version/8/modules/await-identifier-math.result.js b/tests/fixtures/ecma-version/8/modules/await-identifier-math.result.js index 64b0d2a9..7192c249 100644 --- a/tests/fixtures/ecma-version/8/modules/await-identifier-math.result.js +++ b/tests/fixtures/ecma-version/8/modules/await-identifier-math.result.js @@ -1,5 +1,5 @@ module.exports = { - "message": "Can not use keyword 'await' outside an async function", + "message": "Cannot use keyword 'await' outside an async function", "column": 18, "index": 17, "lineNumber": 1 diff --git a/tests/fixtures/ecma-version/8/modules/invalid-async-await-identifier.result.js b/tests/fixtures/ecma-version/8/modules/invalid-async-await-identifier.result.js index 965aef08..713a6842 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-async-await-identifier.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-async-await-identifier.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 32, "index": 31, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-async-await-param.result.js b/tests/fixtures/ecma-version/8/modules/invalid-async-await-param.result.js index e862d369..e5f9512c 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-async-await-param.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-async-await-param.result.js @@ -2,5 +2,5 @@ module.exports = { "index": 19, "lineNumber": 1, "column": 20, - "message": "Can not use 'await' as identifier inside an async function" -} \ No newline at end of file + "message": "Cannot use 'await' as identifier inside an async function" +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-async-class-method-await.result.js b/tests/fixtures/ecma-version/8/modules/invalid-async-class-method-await.result.js index 965aef08..713a6842 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-async-class-method-await.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-async-class-method-await.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 32, "index": 31, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-async-method-await-identifier.result.js b/tests/fixtures/ecma-version/8/modules/invalid-async-method-await-identifier.result.js index 30d7613b..06e193dd 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-async-method-await-identifier.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-async-method-await-identifier.result.js @@ -2,5 +2,5 @@ module.exports = { "index": 27, "lineNumber": 1, "column": 28, - "message": "Can not use 'await' as identifier inside an async function" -} \ No newline at end of file + "message": "Cannot use 'await' as identifier inside an async function" +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-async-method-await-param.result.js b/tests/fixtures/ecma-version/8/modules/invalid-async-method-await-param.result.js index e862d369..e5f9512c 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-async-method-await-param.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-async-method-await-param.result.js @@ -2,5 +2,5 @@ module.exports = { "index": 19, "lineNumber": 1, "column": 20, - "message": "Can not use 'await' as identifier inside an async function" -} \ No newline at end of file + "message": "Cannot use 'await' as identifier inside an async function" +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-async-method-expression.result.js b/tests/fixtures/ecma-version/8/modules/invalid-async-method-expression.result.js index 351656b4..1250bf71 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-async-method-expression.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-async-method-expression.result.js @@ -2,5 +2,5 @@ module.exports = { "index": 20, "lineNumber": 1, "column": 21, - "message": "Can not use 'await' as identifier inside an async function" -} \ No newline at end of file + "message": "Cannot use 'await' as identifier inside an async function" +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-async-method-return-await.result.js b/tests/fixtures/ecma-version/8/modules/invalid-async-method-return-await.result.js index 5a970591..8a1a8057 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-async-method-return-await.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-async-method-return-await.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 25, "index": 24, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-arrow-param-parens.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-arrow-param-parens.result.js index 16dceb4a..a0785833 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-arrow-param-parens.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-arrow-param-parens.result.js @@ -1,5 +1,5 @@ module.exports = { - "message": "Can not use keyword 'await' outside an async function", + "message": "Cannot use keyword 'await' outside an async function", "column": 8, "index": 7, "lineNumber": 1 diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-arrow-param.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-arrow-param.result.js index 3a44064b..f90dbff0 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-arrow-param.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-arrow-param.result.js @@ -1,5 +1,5 @@ module.exports = { - "message": "Can not use keyword 'await' outside an async function", + "message": "Cannot use keyword 'await' outside an async function", "column": 7, "index": 6, "lineNumber": 1 diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-destructured-param.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-destructured-param.result.js index 85a74828..715bff43 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-destructured-param.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-destructured-param.result.js @@ -2,5 +2,5 @@ module.exports = { "index": 8, "lineNumber": 1, "column": 9, - "message": "Can not use keyword 'await' outside an async function" + "message": "Cannot use keyword 'await' outside an async function" }; diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-func-expression.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-func-expression.result.js index e333aacc..7f29a08e 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-func-expression.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-func-expression.result.js @@ -2,5 +2,5 @@ module.exports = { "index": 16, "lineNumber": 1, "column": 17, - "message": "Can not use 'await' as identifier inside an async function" -} \ No newline at end of file + "message": "Cannot use 'await' as identifier inside an async function" +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-identifier-expression.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-identifier-expression.result.js index 291bc0cd..f40070a4 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-identifier-expression.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-identifier-expression.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 33, "index": 32, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-identifier.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-identifier.result.js index 965aef08..713a6842 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-identifier.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-identifier.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 32, "index": 31, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-named-destructured-array-param.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-named-destructured-array-param.result.js index b319d44b..05d746eb 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-named-destructured-array-param.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-named-destructured-array-param.result.js @@ -1,5 +1,5 @@ module.exports = { - "message": "Can not use keyword 'await' outside an async function", + "message": "Cannot use keyword 'await' outside an async function", "column": 9, "index": 8, "lineNumber": 1 diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-named-destructured-param.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-named-destructured-param.result.js index 388f4f03..f4602aed 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-named-destructured-param.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-named-destructured-param.result.js @@ -1,5 +1,5 @@ module.exports = { - "message": "Can not use keyword 'await' outside an async function", + "message": "Cannot use keyword 'await' outside an async function", "column": 12, "index": 11, "lineNumber": 1 diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-param-expression.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-param-expression.result.js index 351656b4..1250bf71 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-param-expression.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-param-expression.result.js @@ -2,5 +2,5 @@ module.exports = { "index": 20, "lineNumber": 1, "column": 21, - "message": "Can not use 'await' as identifier inside an async function" -} \ No newline at end of file + "message": "Cannot use 'await' as identifier inside an async function" +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-param.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-param.result.js index e862d369..e5f9512c 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-param.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-param.result.js @@ -2,5 +2,5 @@ module.exports = { "index": 19, "lineNumber": 1, "column": 20, - "message": "Can not use 'await' as identifier inside an async function" -} \ No newline at end of file + "message": "Cannot use 'await' as identifier inside an async function" +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-await-top-level.result.js b/tests/fixtures/ecma-version/8/modules/invalid-await-top-level.result.js index b325179c..80890802 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-await-top-level.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-await-top-level.result.js @@ -1,5 +1,5 @@ module.exports = { - "message": "Can not use keyword 'await' outside an async function", + "message": "Cannot use keyword 'await' outside an async function", "column": 1, "index": 0, "lineNumber": 1 diff --git a/tests/fixtures/ecma-version/8/modules/invalid-nested-async.result.js b/tests/fixtures/ecma-version/8/modules/invalid-nested-async.result.js index d5697e80..4dd4c86c 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-nested-async.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-nested-async.result.js @@ -2,5 +2,5 @@ module.exports = { "index": 41, "lineNumber": 2, "column": 18, - "message": "Can not use 'await' as identifier inside an async function" -} \ No newline at end of file + "message": "Cannot use 'await' as identifier inside an async function" +} diff --git a/tests/fixtures/ecma-version/8/modules/invalid-plain-await.result.js b/tests/fixtures/ecma-version/8/modules/invalid-plain-await.result.js index b325179c..80890802 100644 --- a/tests/fixtures/ecma-version/8/modules/invalid-plain-await.result.js +++ b/tests/fixtures/ecma-version/8/modules/invalid-plain-await.result.js @@ -1,5 +1,5 @@ module.exports = { - "message": "Can not use keyword 'await' outside an async function", + "message": "Cannot use keyword 'await' outside an async function", "column": 1, "index": 0, "lineNumber": 1 diff --git a/tests/fixtures/ecma-version/8/modules/plain-await.result.js b/tests/fixtures/ecma-version/8/modules/plain-await.result.js index b325179c..80890802 100644 --- a/tests/fixtures/ecma-version/8/modules/plain-await.result.js +++ b/tests/fixtures/ecma-version/8/modules/plain-await.result.js @@ -1,5 +1,5 @@ module.exports = { - "message": "Can not use keyword 'await' outside an async function", + "message": "Cannot use keyword 'await' outside an async function", "column": 1, "index": 0, "lineNumber": 1 diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-async-await-identifier.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-async-await-identifier.result.js index 965aef08..713a6842 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-async-await-identifier.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-async-await-identifier.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 32, "index": 31, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-async-await-param.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-async-await-param.result.js index fc8ff785..0dcc7abe 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-async-await-param.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-async-await-param.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 20, "index": 19, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-async-class-method-await.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-async-class-method-await.result.js index 965aef08..713a6842 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-async-class-method-await.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-async-class-method-await.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 32, "index": 31, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-await-identifier.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-await-identifier.result.js index 1be96c9a..1bc286cf 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-await-identifier.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-await-identifier.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 28, "index": 27, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-await-param.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-await-param.result.js index fc8ff785..0dcc7abe 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-await-param.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-await-param.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 20, "index": 19, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-expression.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-expression.result.js index e982b961..a03f90a7 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-expression.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-expression.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 21, "index": 20, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-return-await.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-return-await.result.js index 5a970591..8a1a8057 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-return-await.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-async-method-return-await.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 25, "index": 24, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-await-arrow-param-parens.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-await-arrow-param-parens.result.js index 5a78f343..27ad4b68 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-await-arrow-param-parens.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-await-arrow-param-parens.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 8, "index": 7, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-await-arrow-param.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-await-arrow-param.result.js index 3e8aa569..5cf5510b 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-await-arrow-param.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-await-arrow-param.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 7, "index": 6, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-await-destructured-param.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-await-destructured-param.result.js index c5072011..ef744391 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-await-destructured-param.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-await-destructured-param.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 9, "index": 8, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-await-func-expression.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-await-func-expression.result.js index ba303681..63e3d476 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-await-func-expression.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-await-func-expression.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 17, "index": 16, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-await-identifier-expression.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-await-identifier-expression.result.js index 291bc0cd..f40070a4 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-await-identifier-expression.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-await-identifier-expression.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 33, "index": 32, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-await-identifier.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-await-identifier.result.js index 965aef08..713a6842 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-await-identifier.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-await-identifier.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 32, "index": 31, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-await-named-destructured-array-param.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-await-named-destructured-array-param.result.js index c5072011..ef744391 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-await-named-destructured-array-param.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-await-named-destructured-array-param.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 9, "index": 8, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-await-named-destructured-param.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-await-named-destructured-param.result.js index f5aca93f..f048dceb 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-await-named-destructured-param.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-await-named-destructured-param.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 12, "index": 11, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-await-param-expression.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-await-param-expression.result.js index e982b961..a03f90a7 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-await-param-expression.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-await-param-expression.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 21, "index": 20, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-await-param.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-await-param.result.js index fc8ff785..0dcc7abe 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-await-param.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-await-param.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 20, "index": 19, "lineNumber": 1 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/8/not-strict/invalid-nested-async.result.js b/tests/fixtures/ecma-version/8/not-strict/invalid-nested-async.result.js index e1aae2a2..ae2bd9e1 100644 --- a/tests/fixtures/ecma-version/8/not-strict/invalid-nested-async.result.js +++ b/tests/fixtures/ecma-version/8/not-strict/invalid-nested-async.result.js @@ -1,6 +1,6 @@ module.exports = { - "message": "Can not use 'await' as identifier inside an async function", + "message": "Cannot use 'await' as identifier inside an async function", "column": 18, "index": 41, "lineNumber": 2 -} \ No newline at end of file +} diff --git a/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-1.module-result.js b/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-1.module-result.js index 73e6bb83..388aedae 100644 --- a/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-1.module-result.js +++ b/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-1.module-result.js @@ -2,5 +2,5 @@ module.exports = { "index": 28, "lineNumber": 1, "column": 29, - "message": "Can not use keyword 'await' outside an async function" + "message": "Cannot use keyword 'await' outside an async function" }; diff --git a/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-2.module-result.js b/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-2.module-result.js index cd1b05ca..0e128aee 100644 --- a/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-2.module-result.js +++ b/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-2.module-result.js @@ -2,5 +2,5 @@ module.exports = { "index": 30, "lineNumber": 1, "column": 31, - "message": "Can not use keyword 'await' outside an async function" + "message": "Cannot use keyword 'await' outside an async function" }; diff --git a/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-3.module-result.js b/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-3.module-result.js index ef1e73e6..75af2b97 100644 --- a/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-3.module-result.js +++ b/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-3.module-result.js @@ -2,5 +2,5 @@ module.exports = { "index": 27, "lineNumber": 1, "column": 28, - "message": "Can not use keyword 'await' outside an async function" + "message": "Cannot use keyword 'await' outside an async function" }; diff --git a/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-4.module-result.js b/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-4.module-result.js index 1daed299..957a6b13 100644 --- a/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-4.module-result.js +++ b/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-4.module-result.js @@ -2,5 +2,5 @@ module.exports = { "index": 29, "lineNumber": 1, "column": 30, - "message": "Can not use keyword 'await' outside an async function" + "message": "Cannot use keyword 'await' outside an async function" }; diff --git a/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-4.result.js b/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-4.result.js index 0bb4116c..e9b5807e 100644 --- a/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-4.result.js +++ b/tests/fixtures/ecma-version/9/async-generator/invalid-await-in-nested-function-4.result.js @@ -3,4 +3,4 @@ module.exports = { "lineNumber": 1, "column": 36, "message": "Unexpected token a" -}; \ No newline at end of file +}; diff --git a/tests/fixtures/ecma-version/9/async-generator/invalid-yield-in-nested-function-4.result.js b/tests/fixtures/ecma-version/9/async-generator/invalid-yield-in-nested-function-4.result.js index 0bb4116c..20483b50 100644 --- a/tests/fixtures/ecma-version/9/async-generator/invalid-yield-in-nested-function-4.result.js +++ b/tests/fixtures/ecma-version/9/async-generator/invalid-yield-in-nested-function-4.result.js @@ -1,6 +1,6 @@ module.exports = { - "index": 35, + "index": 29, "lineNumber": 1, - "column": 36, - "message": "Unexpected token a" -}; \ No newline at end of file + "column": 30, + "message": "The keyword 'yield' is reserved" +};