diff --git a/packages/babel-parser/src/parser/base.js b/packages/babel-parser/src/parser/base.js index f147cc88e7..a56058c7c2 100644 --- a/packages/babel-parser/src/parser/base.js +++ b/packages/babel-parser/src/parser/base.js @@ -1,8 +1,6 @@ // @flow import type { Options } from "../options"; -import { isES2015ReservedWord } from "../util/identifier"; - import type State from "../tokenizer/state"; import type { PluginsMap } from "./index"; @@ -17,14 +15,6 @@ export default class BaseParser { // Initialized by Tokenizer state: State; - isReservedWord(word: string): boolean { - if (word === "await") { - return this.inModule; - } else { - return isES2015ReservedWord(word); - } - } - hasPlugin(name: string): boolean { return this.plugins.has(name); } diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 6526eb464a..4f27187123 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -22,9 +22,10 @@ import { types as tt, type TokenType } from "../tokenizer/types"; import * as N from "../types"; import LValParser from "./lval"; import { + isKeyword, + isReservedWord, isStrictReservedWord, isStrictBindReservedWord, - isKeyword, } from "../util/identifier"; import type { Pos, Position } from "../util/location"; import * as charCodes from "charcodes"; @@ -1988,43 +1989,45 @@ export default class ExpressionParser extends LValParser { checkKeywords: boolean, isBinding: boolean, ): void { - if (this.state.inGenerator && word === "yield") { + const state = this.state; + if (state.inGenerator && word === "yield") { this.raise( startLoc, "Can not use 'yield' as identifier inside a generator", ); } - if (this.state.inAsync && word === "await") { + if (state.inAsync && word === "await") { this.raise( startLoc, "Can not use 'await' as identifier inside an async function", ); } - if (this.state.inClassProperty && word === "arguments") { + if (state.inClassProperty && word === "arguments") { this.raise( startLoc, "'arguments' is not allowed in class field initializer", ); } + if (checkKeywords && isKeyword(word)) { + this.raise(startLoc, `Unexpected keyword '${word}'`); + } - if (this.isReservedWord(word) || (checkKeywords && isKeyword(word))) { - if (!this.state.inAsync && word === "await") { + const reservedTest = !state.strict + ? isReservedWord + : isBinding + ? isStrictBindReservedWord + : isStrictReservedWord; + + if (reservedTest(word, this.inModule)) { + if (!state.inAsync && word === "await") { this.raise( startLoc, "Can not use keyword 'await' outside an async function", ); } - this.raise(startLoc, word + " is a reserved word"); - } - - if ( - this.state.strict && - (isStrictReservedWord(word) || - (isBinding && isStrictBindReservedWord(word))) - ) { - this.raise(startLoc, word + " is a reserved word in strict mode"); + this.raise(startLoc, `Unexpected reserved word '${word}'`); } } diff --git a/packages/babel-parser/src/parser/lval.js b/packages/babel-parser/src/parser/lval.js index 4781ed04b7..6b9e6c6ac9 100644 --- a/packages/babel-parser/src/parser/lval.js +++ b/packages/babel-parser/src/parser/lval.js @@ -14,10 +14,7 @@ import type { SpreadElement, } from "../types"; import type { Pos, Position } from "../util/location"; -import { - isStrictReservedWord, - isStrictBindReservedWord, -} from "../util/identifier"; +import { isStrictBindReservedWord } from "../util/identifier"; import { NodeUtils } from "./node"; export default class LValParser extends NodeUtils { @@ -336,12 +333,13 @@ export default class LValParser extends NodeUtils { case "Identifier": if ( this.state.strict && - (isStrictReservedWord(expr.name) || - isStrictBindReservedWord(expr.name)) + isStrictBindReservedWord(expr.name, this.inModule) ) { this.raise( expr.start, - expr.name + " is a reserved word in strict mode", + `${isBinding ? "Binding" : "Assigning to"} '${ + expr.name + }' in strict mode`, ); } diff --git a/packages/babel-parser/src/util/identifier.js b/packages/babel-parser/src/util/identifier.js index ce550ed1be..d8fa87603c 100644 --- a/packages/babel-parser/src/util/identifier.js +++ b/packages/babel-parser/src/util/identifier.js @@ -4,27 +4,52 @@ import * as charCodes from "charcodes"; -export const isES2015ReservedWord = (word: string): boolean => { - return word === "enum" || word === "await"; +const reservedWords = { + strict: [ + "implements", + "interface", + "let", + "package", + "private", + "protected", + "public", + "static", + "yield", + ], + strictBind: ["eval", "arguments"], }; -const reservedWordsStrict = new Set([ - "implements", - "interface", - "let", - "package", - "private", - "protected", - "public", - "static", - "yield", -]); -export function isStrictReservedWord(word: string): boolean { - return reservedWordsStrict.has(word); +const reservedWordsStrictSet = new Set(reservedWords.strict); +const reservedWordsStrictBindSet = new Set( + reservedWords.strict.concat(reservedWords.strictBind), +); + +/** + * Checks if word is a reserved word in non-strict mode + */ +export const isReservedWord = (word: string, inModule: boolean): boolean => { + return (inModule && word === "await") || word === "enum"; +}; + +/** + * Checks if word is a reserved word in non-binding strict mode + * + * Includes non-strict reserved words + */ +export function isStrictReservedWord(word: string, inModule: boolean): boolean { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); } -export function isStrictBindReservedWord(word: string): boolean { - return word === "eval" || word === "arguments"; +/** + * Checks if word is a reserved word in binding strict mode + * + * Includes non-strict reserved words and non-binding strict reserved words + */ +export function isStrictBindReservedWord( + word: string, + inModule: boolean, +): boolean { + return isReservedWord(word, inModule) || reservedWordsStrictBindSet.has(word); } const keywords = new Set([ diff --git a/packages/babel-parser/test/expressions/is-expression-babel-parser/fail/8/options.json b/packages/babel-parser/test/expressions/is-expression-babel-parser/fail/8/options.json index e2125b7041..5f24fc4399 100644 --- a/packages/babel-parser/test/expressions/is-expression-babel-parser/fail/8/options.json +++ b/packages/babel-parser/test/expressions/is-expression-babel-parser/fail/8/options.json @@ -1,4 +1,4 @@ { "strictMode": true, - "throws": "public is a reserved word in strict mode (2:0)" + "throws": "Unexpected reserved word 'public' (2:0)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/468/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/468/options.json index 28f8810614..b463f315f9 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/468/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/468/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:36)" -} + "throws": "Binding 'eval' in strict mode (1:36)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/469/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/469/options.json index 913c7bb59f..9e9f875dfb 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/469/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/469/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:36)" -} + "throws": "Binding 'arguments' in strict mode (1:36)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/470/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/470/options.json index 0306783e6e..b5fd79ff5f 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/470/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/470/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:47)" -} + "throws": "Binding 'eval' in strict mode (1:47)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/471/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/471/options.json index d1ae282536..15b7ac8553 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/471/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/471/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:47)" -} + "throws": "Binding 'arguments' in strict mode (1:47)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/472/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/472/options.json index 3bcd668ab1..95f470aed5 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/472/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/472/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'eval' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/473/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/473/options.json index 04db3a2178..ef45890ab5 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/473/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/473/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'arguments' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/474/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/474/options.json index 48fd4ff419..2783b68b3d 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/474/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/474/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:34)" -} + "throws": "Assigning to 'eval' in strict mode (1:34)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/475/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/475/options.json index 48fd4ff419..2783b68b3d 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/475/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/475/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:34)" -} + "throws": "Assigning to 'eval' in strict mode (1:34)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/476/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/476/options.json index d579a92e23..fe2654496f 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/476/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/476/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:34)" -} + "throws": "Assigning to 'arguments' in strict mode (1:34)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/477/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/477/options.json index d579a92e23..fe2654496f 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/477/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/477/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:34)" -} + "throws": "Assigning to 'arguments' in strict mode (1:34)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/478/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/478/options.json index 3bcd668ab1..95f470aed5 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/478/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/478/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'eval' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/479/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/479/options.json index 3bcd668ab1..95f470aed5 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/479/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/479/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'eval' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/480/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/480/options.json index 04db3a2178..ef45890ab5 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/480/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/480/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'arguments' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/481/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/481/options.json index 04db3a2178..ef45890ab5 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/481/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/481/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'arguments' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/482/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/482/options.json index 71bbcc0b9c..6db4ae7bf0 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/482/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/482/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:41)" -} + "throws": "Binding 'eval' in strict mode (1:41)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/483/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/483/options.json index 544d28f502..b02fb725c7 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/483/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/483/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:41)" -} + "throws": "Binding 'arguments' in strict mode (1:41)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/484/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/484/options.json index bf851387b4..a7490f9321 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/484/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/484/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:9)" -} + "throws": "Binding 'eval' in strict mode (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/485/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/485/options.json index e4d477b8e4..80b8b2d85c 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/485/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/485/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:9)" -} + "throws": "Binding 'arguments' in strict mode (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/486/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/486/options.json index f6c8eea4b0..706ba8380c 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/486/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/486/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:42)" -} + "throws": "Binding 'eval' in strict mode (1:42)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/487/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/487/options.json index d26216e0a3..d0e461af39 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/487/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/487/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:42)" -} + "throws": "Binding 'arguments' in strict mode (1:42)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/488/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/488/options.json index 69e4925a3f..ee2e7d7c77 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/488/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/488/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:10)" -} + "throws": "Binding 'eval' in strict mode (1:10)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/489/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/489/options.json index fbdc57cfc8..bb4b812bab 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/489/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/489/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:10)" -} + "throws": "Binding 'arguments' in strict mode (1:10)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/490/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/490/options.json index 0306783e6e..b5fd79ff5f 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/490/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/490/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:47)" -} + "throws": "Binding 'eval' in strict mode (1:47)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/491/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/491/options.json index c2d1e1a69b..ff90f09173 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/491/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/491/options.json @@ -1,3 +1,3 @@ { - "throws": "package is a reserved word in strict mode (1:10)" -} + "throws": "Binding 'package' in strict mode (1:10)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/492/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/492/options.json index 92828dc4f1..b8f97ca4fe 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/492/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/492/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:48)" -} + "throws": "Binding 'eval' in strict mode (1:48)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/493/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/493/options.json index 71bbcc0b9c..6db4ae7bf0 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/493/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/493/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:41)" -} + "throws": "Binding 'eval' in strict mode (1:41)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/494/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/494/options.json index 241eccc1bf..e80a856d48 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/494/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/494/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:49)" -} + "throws": "Binding 'eval' in strict mode (1:49)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/495/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/495/options.json index f56e7311d8..d93d5b2aa6 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/495/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/495/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'eval' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/496/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/496/options.json index 0e19621951..5d2dc563b1 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/496/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/496/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'arguments' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/497/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/497/options.json index 92828dc4f1..b8f97ca4fe 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/497/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/497/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:48)" -} + "throws": "Binding 'eval' in strict mode (1:48)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/498/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/498/options.json index e9f6bf4d32..ab7000409b 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/498/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/498/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:48)" -} + "throws": "Binding 'arguments' in strict mode (1:48)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/504/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/504/options.json index 2748b9f03d..0641de45e2 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/504/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/504/options.json @@ -1,3 +1,3 @@ { - "throws": "implements is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'implements' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/505/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/505/options.json index 6efaf057ca..859238d042 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/505/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/505/options.json @@ -1,3 +1,3 @@ { - "throws": "interface is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'interface' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/506/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/506/options.json index 61578ad8f8..344c7075f4 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/506/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/506/options.json @@ -1,3 +1,3 @@ { - "throws": "package is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'package' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/507/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/507/options.json index da502d0daa..9fb9deaf9c 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/507/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/507/options.json @@ -1,3 +1,3 @@ { - "throws": "private is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'private' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/508/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/508/options.json index 6fd44c0e1b..292fb56f1c 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/508/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/508/options.json @@ -1,3 +1,3 @@ { - "throws": "protected is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'protected' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/509/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/509/options.json index 3a41c740ea..d5f4844690 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/509/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/509/options.json @@ -1,3 +1,3 @@ { - "throws": "public is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'public' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/510/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/510/options.json index 764205122e..0f41ff2e6f 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/510/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/510/options.json @@ -1,3 +1,3 @@ { - "throws": "static is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'static' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/511/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/511/options.json index e316c4fc64..fff472344f 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/511/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/511/options.json @@ -1,3 +1,3 @@ { - "throws": "static is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'static' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/512/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/512/options.json index 9b6fddd2eb..d4d0a96bfb 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/512/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/512/options.json @@ -1,3 +1,3 @@ { - "throws": "static is a reserved word in strict mode (1:9)" -} + "throws": "Binding 'static' in strict mode (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/513/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/513/options.json index a2eac88ba6..91bc36d3f3 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/513/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/513/options.json @@ -1,3 +1,3 @@ { - "throws": "static is a reserved word in strict mode (1:23)" + "throws": "Unexpected reserved word 'static' (1:23)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/515/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/515/options.json index 0bb96c96d8..e227bd1a6b 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/515/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/515/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:11)" -} + "throws": "Binding 'eval' in strict mode (1:11)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/516/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/516/options.json index 7551a61b9e..8e1f9af4ec 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/516/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/516/options.json @@ -1,3 +1,3 @@ { - "throws": "package is a reserved word in strict mode (1:11)" -} + "throws": "Binding 'package' in strict mode (1:11)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/520/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/520/options.json index b52d2d2e15..3c24c608c8 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/520/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/520/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:12)" -} + "throws": "Binding 'eval' in strict mode (1:12)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/521/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/521/options.json index 7b80f0e455..96d524816c 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/521/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/521/options.json @@ -1,3 +1,3 @@ { - "throws": "package is a reserved word in strict mode (1:12)" -} + "throws": "Binding 'package' in strict mode (1:12)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/544/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/544/options.json index 8874a76e59..37c243afff 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/544/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/544/options.json @@ -1,3 +1,3 @@ { - "throws": "public is a reserved word in strict mode (2:8)" + "throws": "Unexpected reserved word 'public' (2:8)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/545/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/545/options.json index 560bb89881..b09fdddc9d 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/545/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/545/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "public is a reserved word in strict mode (1:8)" + "throws": "Unexpected reserved word 'public' (1:8)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/547/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/547/options.json index 20c9b2493e..c2fb6377e8 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/547/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/547/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (2:8)" + "throws": "Unexpected reserved word 'arguments' (2:8)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/548/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/548/options.json index d2dd99623c..4183c2e225 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/548/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/548/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "arguments is a reserved word in strict mode (1:8)" + "throws": "Unexpected reserved word 'arguments' (1:8)" } diff --git a/packages/babel-parser/test/fixtures/es2015/destructuring/binding-this/options.json b/packages/babel-parser/test/fixtures/es2015/destructuring/binding-this/options.json index bc51e124a0..1b54b61689 100644 --- a/packages/babel-parser/test/fixtures/es2015/destructuring/binding-this/options.json +++ b/packages/babel-parser/test/fixtures/es2015/destructuring/binding-this/options.json @@ -1,3 +1,3 @@ { - "throws": "this is a reserved word (1:6)" + "throws": "Unexpected keyword 'this' (1:6)" } diff --git a/packages/babel-parser/test/fixtures/es2015/let/let-as-identifier-strict-fail/options.json b/packages/babel-parser/test/fixtures/es2015/let/let-as-identifier-strict-fail/options.json index 11643dc9d9..ab238c8bbf 100644 --- a/packages/babel-parser/test/fixtures/es2015/let/let-as-identifier-strict-fail/options.json +++ b/packages/babel-parser/test/fixtures/es2015/let/let-as-identifier-strict-fail/options.json @@ -1,3 +1,3 @@ { - "throws": "let is a reserved word in strict mode (2:0)" + "throws": "Unexpected reserved word 'let' (2:0)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-flow/options.json b/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-flow/options.json index 243fc2686d..379fb1f862 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-flow/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-flow/options.json @@ -1,4 +1,4 @@ { "plugins": ["flow"], - "throws": "default is a reserved word (1:9)" + "throws": "Unexpected keyword 'default' (1:9)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-typeof-flow/options.json b/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-typeof-flow/options.json index fa0493b7e1..cda01e8412 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-typeof-flow/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-typeof-flow/options.json @@ -1,4 +1,4 @@ { "plugins": ["flow"], - "throws": "typeof is a reserved word (1:9)" + "throws": "Unexpected keyword 'typeof' (1:9)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-typeof/options.json b/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-typeof/options.json index 0f27b53e91..a45cdb986d 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-typeof/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-typeof/options.json @@ -1,3 +1,3 @@ { - "throws": "typeof is a reserved word (1:9)" + "throws": "Unexpected keyword 'typeof' (1:9)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword/options.json b/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword/options.json index 96dff35646..2c6a46df3f 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword/options.json @@ -1,3 +1,3 @@ { - "throws": "debugger is a reserved word (1:9)" + "throws": "Unexpected keyword 'debugger' (1:9)" } diff --git a/packages/babel-parser/test/fixtures/es2015/shorthand/1/options.json b/packages/babel-parser/test/fixtures/es2015/shorthand/1/options.json index a618f5e2ef..eaa26955dc 100644 --- a/packages/babel-parser/test/fixtures/es2015/shorthand/1/options.json +++ b/packages/babel-parser/test/fixtures/es2015/shorthand/1/options.json @@ -1,3 +1,3 @@ { - "throws": "const is a reserved word (1:11)" + "throws": "Unexpected keyword 'const' (1:11)" } diff --git a/packages/babel-parser/test/fixtures/es2015/shorthand/2/options.json b/packages/babel-parser/test/fixtures/es2015/shorthand/2/options.json index 7691eb820f..be39a44513 100644 --- a/packages/babel-parser/test/fixtures/es2015/shorthand/2/options.json +++ b/packages/babel-parser/test/fixtures/es2015/shorthand/2/options.json @@ -1,3 +1,3 @@ { - "throws": "this is a reserved word (1:8)" + "throws": "Unexpected keyword 'this' (1:8)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/227/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/227/options.json index c83fb4f882..6c907b0a70 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/227/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/227/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:44)" -} + "throws": "Binding 'eval' in strict mode (1:44)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/233/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/233/options.json index 36804413e8..178fa1e528 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/233/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/233/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:20)" -} + "throws": "Assigning to 'eval' in strict mode (1:20)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/234/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/234/options.json index 058a7e4138..4ca97da7ca 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/234/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/234/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:20)" -} + "throws": "Assigning to 'arguments' in strict mode (1:20)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/242/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/242/options.json index f56e7311d8..02a0eafbbb 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/242/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/242/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:15)" -} + "throws": "Assigning to 'eval' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/243/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/243/options.json index c5e6f0e623..e4abe279ab 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/243/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/243/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:14)" -} + "throws": "Binding 'eval' in strict mode (1:14)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/244/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/244/options.json index 3168d40d55..c2a4aaec25 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/244/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/244/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:14)" -} + "throws": "Binding 'arguments' in strict mode (1:14)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/245/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/245/options.json index f56e7311d8..d93d5b2aa6 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/245/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/245/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'eval' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/246/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/246/options.json index 0e19621951..5d2dc563b1 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/246/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/246/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'arguments' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/247/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/247/options.json index f56e7311d8..d93d5b2aa6 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/247/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/247/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'eval' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/289/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/289/options.json index bcd69af2d7..8ed5553896 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/289/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/289/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:5)" -} + "throws": "Binding 'eval' in strict mode (1:5)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/296/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/296/options.json index f56e7311d8..d93d5b2aa6 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/296/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/296/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'eval' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/297/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/297/options.json index 12e8741b8a..224716db80 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/297/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/297/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:1)" -} + "throws": "Binding 'eval' in strict mode (1:1)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/332/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/332/options.json index b346a7872a..610884bb67 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/332/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/332/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:18)" -} + "throws": "Assigning to 'eval' in strict mode (1:18)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/333/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/333/options.json index 46c5c8d53f..567e40541c 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/333/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/333/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:16)" + "throws": "Unexpected reserved word 'eval' (1:16)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/334/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/334/options.json index 92b68ac333..e45ea16ee8 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/334/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/334/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "eval is a reserved word in strict mode (1:4)" -} + "throws": "Assigning to 'eval' in strict mode (1:4)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/368/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/368/options.json index be7cb5854a..bd449d1a17 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/368/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/368/options.json @@ -1,4 +1,4 @@ { "sourceType": "script", - "throws": "enum is a reserved word (1:0)" -} + "throws": "Unexpected reserved word 'enum' (1:0)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/369/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/369/options.json index 471868697d..a8c4888490 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/369/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/369/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "enum is a reserved word (1:0)" -} + "throws": "Unexpected reserved word 'enum' (1:0)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/370/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/370/options.json index b792a5158d..eb23932ac5 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/370/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/370/options.json @@ -1,4 +1,4 @@ { "sourceType": "script", - "throws": "enum is a reserved word (1:6)" -} + "throws": "Unexpected reserved word 'enum' (1:6)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/371/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/371/options.json index 4a7908c1fb..caa406928d 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/371/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/371/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "enum is a reserved word (1:6)" -} + "throws": "Unexpected reserved word 'enum' (1:6)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/372/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/372/options.json index 67b6ff2f16..1b022077e7 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/372/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/372/options.json @@ -1,4 +1,4 @@ { "sourceType": "script", - "throws": "enum is a reserved word (1:8)" -} + "throws": "Unexpected reserved word 'enum' (1:8)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/373/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/373/options.json index 5c2c250e15..dd3434fd06 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/373/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/373/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "enum is a reserved word (1:8)" -} + "throws": "Unexpected reserved word 'enum' (1:8)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/374/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/374/options.json index b10f9979f5..e8900a8014 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/374/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/374/options.json @@ -1,4 +1,4 @@ { "sourceType": "script", - "throws": "enum is a reserved word (1:15)" -} + "throws": "Unexpected reserved word 'enum' (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/375/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/375/options.json index dc427ad7ef..8169da7d90 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/375/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/375/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "enum is a reserved word (1:15)" -} + "throws": "Unexpected reserved word 'enum' (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/376/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/376/options.json index 8d226ef8ec..24b609367e 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/376/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/376/options.json @@ -1,4 +1,4 @@ { "sourceType": "script", - "throws": "enum is a reserved word (1:9)" -} + "throws": "Unexpected reserved word 'enum' (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/377/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/377/options.json index cdfa39cc09..51b7612a6e 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/377/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/377/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "enum is a reserved word (1:9)" -} + "throws": "Unexpected reserved word 'enum' (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/378/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/378/options.json index b792a5158d..eb23932ac5 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/378/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/378/options.json @@ -1,4 +1,4 @@ { "sourceType": "script", - "throws": "enum is a reserved word (1:6)" -} + "throws": "Unexpected reserved word 'enum' (1:6)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/379/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/379/options.json index 4a7908c1fb..caa406928d 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/379/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/379/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "enum is a reserved word (1:6)" -} + "throws": "Unexpected reserved word 'enum' (1:6)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/yield/function-name-strict-body/options.json b/packages/babel-parser/test/fixtures/es2015/yield/function-name-strict-body/options.json index cf06e871cc..091e7958db 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/function-name-strict-body/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/function-name-strict-body/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:9)" -} + "throws": "Binding 'yield' in strict mode (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/yield/function-name-strict/options.json b/packages/babel-parser/test/fixtures/es2015/yield/function-name-strict/options.json index 18a54259fa..320734ea2e 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/function-name-strict/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/function-name-strict/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (2:9)" + "throws": "Unexpected reserved word 'yield' (2:9)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/in-class-heritage/options.json b/packages/babel-parser/test/fixtures/es2015/yield/in-class-heritage/options.json index a2857a14ad..e817f30acb 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/in-class-heritage/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/in-class-heritage/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:16)" + "throws": "Unexpected reserved word 'yield' (1:16)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-strict/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-strict/options.json index 4654361314..ecc179f974 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-strict/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-strict/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (2:16)" + "throws": "Unexpected reserved word 'yield' (2:16)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-strict-body/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-strict-body/options.json index 37e79f9fb8..cb8efaaa0a 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-strict-body/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-strict-body/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:12)" -} + "throws": "Binding 'yield' in strict mode (1:12)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-strict/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-strict/options.json index e65626183c..75bdf3d53d 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-strict/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-strict/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (2:12)" + "throws": "Unexpected reserved word 'yield' (2:12)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/options.json index e0027065af..2e6d7156cf 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:0)" -} + "throws": "Binding 'eval' in strict mode (1:0)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json index b5a3c5be23..23a96f285f 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "yield is a reserved word in strict mode (1:25)" + "throws": "Unexpected reserved word 'yield' (1:25)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/options.json index 5255751472..865e081676 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:46)" + "throws": "Unexpected reserved word 'yield' (1:46)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/options.json index 4fab5560e7..21348af523 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:47)" + "throws": "Unexpected reserved word 'yield' (1:47)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/options.json index a2857a14ad..e817f30acb 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:16)" + "throws": "Unexpected reserved word 'yield' (1:16)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/options.json index 1de2e87eff..e80b46c31b 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:19)" + "throws": "Unexpected reserved word 'yield' (1:19)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/options.json index 05cab66d4e..27b38d28f9 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:15)" + "throws": "Unexpected reserved word 'yield' (1:15)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/options.json index 997d8d34da..5d111aab93 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:23)" + "throws": "Unexpected reserved word 'yield' (1:23)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/options.json index 84c444f0cd..01aca4591c 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:28)" + "throws": "Unexpected reserved word 'yield' (1:28)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/options.json index eadb012401..a4a677fb31 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:25)" + "throws": "Unexpected reserved word 'yield' (1:25)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/options.json index cf06e871cc..091e7958db 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:9)" -} + "throws": "Binding 'yield' in strict mode (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/options.json index c0b0db5cc9..1c3817f8e0 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:10)" -} + "throws": "Binding 'yield' in strict mode (1:10)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/options.json index 0fa96eb13c..4124312495 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:29)" + "throws": "Unexpected reserved word 'yield' (1:29)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/options.json index 773a6f2a5d..53a8921cb3 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:18)" + "throws": "Unexpected reserved word 'yield' (1:18)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/options.json index 84c444f0cd..01aca4591c 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:28)" + "throws": "Unexpected reserved word 'yield' (1:28)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/options.json index 773a6f2a5d..53a8921cb3 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:18)" + "throws": "Unexpected reserved word 'yield' (1:18)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0087/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0087/options.json index f56e7311d8..02a0eafbbb 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0087/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0087/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:15)" -} + "throws": "Assigning to 'eval' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0088/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0088/options.json index c5e6f0e623..e4abe279ab 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0088/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0088/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:14)" -} + "throws": "Binding 'eval' in strict mode (1:14)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0089/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0089/options.json index 3168d40d55..c2a4aaec25 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0089/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0089/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:14)" -} + "throws": "Binding 'arguments' in strict mode (1:14)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0090/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0090/options.json index f56e7311d8..d93d5b2aa6 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0090/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0090/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'eval' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0091/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0091/options.json index 0e19621951..5d2dc563b1 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0091/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0091/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'arguments' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0100/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0100/options.json index f56e7311d8..d93d5b2aa6 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0100/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0100/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'eval' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0101/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0101/options.json index 12e8741b8a..224716db80 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0101/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0101/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:1)" -} + "throws": "Binding 'eval' in strict mode (1:1)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0185/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0185/options.json index 28f8810614..b463f315f9 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0185/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0185/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:36)" -} + "throws": "Binding 'eval' in strict mode (1:36)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0186/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0186/options.json index 913c7bb59f..9e9f875dfb 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0186/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0186/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:36)" -} + "throws": "Binding 'arguments' in strict mode (1:36)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0187/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0187/options.json index 0306783e6e..b5fd79ff5f 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0187/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0187/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:47)" -} + "throws": "Binding 'eval' in strict mode (1:47)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0188/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0188/options.json index d1ae282536..15b7ac8553 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0188/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0188/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:47)" -} + "throws": "Binding 'arguments' in strict mode (1:47)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0189/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0189/options.json index 3bcd668ab1..95f470aed5 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0189/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0189/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'eval' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0190/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0190/options.json index 04db3a2178..ef45890ab5 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0190/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0190/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'arguments' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0191/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0191/options.json index 48fd4ff419..2783b68b3d 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0191/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0191/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:34)" -} + "throws": "Assigning to 'eval' in strict mode (1:34)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0192/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0192/options.json index 48fd4ff419..2783b68b3d 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0192/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0192/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:34)" -} + "throws": "Assigning to 'eval' in strict mode (1:34)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0193/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0193/options.json index d579a92e23..fe2654496f 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0193/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0193/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:34)" -} + "throws": "Assigning to 'arguments' in strict mode (1:34)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0194/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0194/options.json index d579a92e23..fe2654496f 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0194/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0194/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:34)" -} + "throws": "Assigning to 'arguments' in strict mode (1:34)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0195/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0195/options.json index 3bcd668ab1..95f470aed5 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0195/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0195/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'eval' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0196/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0196/options.json index 3bcd668ab1..95f470aed5 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0196/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0196/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'eval' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0197/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0197/options.json index 04db3a2178..ef45890ab5 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0197/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0197/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'arguments' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0198/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0198/options.json index 04db3a2178..ef45890ab5 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0198/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0198/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:32)" -} + "throws": "Assigning to 'arguments' in strict mode (1:32)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0199/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0199/options.json index 71bbcc0b9c..6db4ae7bf0 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0199/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0199/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:41)" -} + "throws": "Binding 'eval' in strict mode (1:41)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0200/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0200/options.json index 544d28f502..b02fb725c7 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0200/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0200/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:41)" -} + "throws": "Binding 'arguments' in strict mode (1:41)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0201/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0201/options.json index bf851387b4..a7490f9321 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0201/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0201/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:9)" -} + "throws": "Binding 'eval' in strict mode (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0202/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0202/options.json index e4d477b8e4..80b8b2d85c 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0202/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0202/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:9)" -} + "throws": "Binding 'arguments' in strict mode (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0203/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0203/options.json index f6c8eea4b0..706ba8380c 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0203/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0203/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:42)" -} + "throws": "Binding 'eval' in strict mode (1:42)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0204/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0204/options.json index d26216e0a3..d0e461af39 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0204/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0204/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:42)" -} + "throws": "Binding 'arguments' in strict mode (1:42)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0205/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0205/options.json index 69e4925a3f..ee2e7d7c77 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0205/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0205/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:10)" -} + "throws": "Binding 'eval' in strict mode (1:10)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0206/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0206/options.json index fbdc57cfc8..bb4b812bab 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0206/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0206/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:10)" -} + "throws": "Binding 'arguments' in strict mode (1:10)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0207/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0207/options.json index 0306783e6e..b5fd79ff5f 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0207/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0207/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:47)" -} + "throws": "Binding 'eval' in strict mode (1:47)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0208/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0208/options.json index c2d1e1a69b..ff90f09173 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0208/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0208/options.json @@ -1,3 +1,3 @@ { - "throws": "package is a reserved word in strict mode (1:10)" -} + "throws": "Binding 'package' in strict mode (1:10)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0209/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0209/options.json index 92828dc4f1..b8f97ca4fe 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0209/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0209/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:48)" -} + "throws": "Binding 'eval' in strict mode (1:48)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0210/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0210/options.json index 71bbcc0b9c..6db4ae7bf0 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0210/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0210/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:41)" -} + "throws": "Binding 'eval' in strict mode (1:41)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0211/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0211/options.json index 241eccc1bf..e80a856d48 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0211/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0211/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:49)" -} + "throws": "Binding 'eval' in strict mode (1:49)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0212/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0212/options.json index f56e7311d8..d93d5b2aa6 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0212/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0212/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'eval' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0213/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0213/options.json index 0e19621951..5d2dc563b1 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0213/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0213/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'arguments' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0214/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0214/options.json index 92828dc4f1..b8f97ca4fe 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0214/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0214/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:48)" -} + "throws": "Binding 'eval' in strict mode (1:48)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0215/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0215/options.json index e9f6bf4d32..ab7000409b 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0215/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0215/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:48)" -} + "throws": "Binding 'arguments' in strict mode (1:48)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json index 2748b9f03d..0641de45e2 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0224/options.json @@ -1,3 +1,3 @@ { - "throws": "implements is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'implements' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json index 6efaf057ca..859238d042 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0225/options.json @@ -1,3 +1,3 @@ { - "throws": "interface is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'interface' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json index 61578ad8f8..344c7075f4 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0226/options.json @@ -1,3 +1,3 @@ { - "throws": "package is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'package' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json index da502d0daa..9fb9deaf9c 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0227/options.json @@ -1,3 +1,3 @@ { - "throws": "private is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'private' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json index 6fd44c0e1b..292fb56f1c 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0228/options.json @@ -1,3 +1,3 @@ { - "throws": "protected is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'protected' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json index 3a41c740ea..d5f4844690 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0229/options.json @@ -1,3 +1,3 @@ { - "throws": "public is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'public' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json index 764205122e..0f41ff2e6f 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0230/options.json @@ -1,3 +1,3 @@ { - "throws": "static is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'static' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0231/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0231/options.json index b31373dfb7..6ab197f35d 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0231/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0231/options.json @@ -1,3 +1,3 @@ { - "throws": "yield is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'yield' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0232/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0232/options.json index 81e5594d82..d2f3cbc2e1 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0232/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0232/options.json @@ -1,3 +1,3 @@ { - "throws": "let is a reserved word in strict mode (1:37)" + "throws": "Unexpected reserved word 'let' (1:37)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0233/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0233/options.json index e316c4fc64..fff472344f 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0233/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0233/options.json @@ -1,3 +1,3 @@ { - "throws": "static is a reserved word in strict mode (1:15)" -} + "throws": "Binding 'static' in strict mode (1:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0234/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0234/options.json index 9b6fddd2eb..d4d0a96bfb 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0234/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0234/options.json @@ -1,3 +1,3 @@ { - "throws": "static is a reserved word in strict mode (1:9)" -} + "throws": "Binding 'static' in strict mode (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0235/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0235/options.json index bf851387b4..a7490f9321 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0235/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0235/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:9)" -} + "throws": "Binding 'eval' in strict mode (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0236/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0236/options.json index e4d477b8e4..80b8b2d85c 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0236/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0236/options.json @@ -1,3 +1,3 @@ { - "throws": "arguments is a reserved word in strict mode (1:9)" -} + "throws": "Binding 'arguments' in strict mode (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json index a2eac88ba6..91bc36d3f3 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0239/options.json @@ -1,3 +1,3 @@ { - "throws": "static is a reserved word in strict mode (1:23)" + "throws": "Unexpected reserved word 'static' (1:23)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0241/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0241/options.json index 0bb96c96d8..e227bd1a6b 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0241/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0241/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:11)" -} + "throws": "Binding 'eval' in strict mode (1:11)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0242/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0242/options.json index 7551a61b9e..8e1f9af4ec 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0242/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0242/options.json @@ -1,3 +1,3 @@ { - "throws": "package is a reserved word in strict mode (1:11)" -} + "throws": "Binding 'package' in strict mode (1:11)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0246/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0246/options.json index b52d2d2e15..3c24c608c8 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0246/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0246/options.json @@ -1,3 +1,3 @@ { - "throws": "eval is a reserved word in strict mode (1:12)" -} + "throws": "Binding 'eval' in strict mode (1:12)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0247/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0247/options.json index 7b80f0e455..96d524816c 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0247/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0247/options.json @@ -1,3 +1,3 @@ { - "throws": "package is a reserved word in strict mode (1:12)" -} + "throws": "Binding 'package' in strict mode (1:12)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0277/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0277/options.json index bea671da23..aef7f56007 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0277/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0277/options.json @@ -1,3 +1,3 @@ { - "throws": "enum is a reserved word (1:11)" + "throws": "Unexpected reserved word 'enum' (1:11)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json index a07e958c4d..757b207f0e 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0278/options.json @@ -1,3 +1,3 @@ { - "throws": "static is a reserved word in strict mode (1:17)" + "throws": "Unexpected reserved word 'static' (1:17)" } diff --git a/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-as/options.json b/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-as/options.json index 011c7d25da..5133797973 100644 --- a/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-as/options.json +++ b/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-as/options.json @@ -1,3 +1,3 @@ { - "throws": "debugger is a reserved word (1:17)" + "throws": "Unexpected keyword 'debugger' (1:17)" } diff --git a/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/reserved-word-class-name-failure/options.json b/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/reserved-word-class-name-failure/options.json index e8aeb07ed7..f45196d78d 100644 --- a/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/reserved-word-class-name-failure/options.json +++ b/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/reserved-word-class-name-failure/options.json @@ -1,4 +1,4 @@ { - "throws": "delete is a reserved word (1:14)", + "throws": "Unexpected keyword 'delete' (1:14)", "plugins": ["flow", "jsx"] } diff --git a/packages/babel-preset-typescript/test/fixtures/flow-compat/js-invalid/options.json b/packages/babel-preset-typescript/test/fixtures/flow-compat/js-invalid/options.json index e91f37cda8..fe0ad873da 100644 --- a/packages/babel-preset-typescript/test/fixtures/flow-compat/js-invalid/options.json +++ b/packages/babel-preset-typescript/test/fixtures/flow-compat/js-invalid/options.json @@ -1,4 +1,4 @@ { "presets": [["flow", {}, "before"], "typescript", ["flow", {}, "after"]], - "throws": "enum is a reserved word (1:0)" + "throws": "Unexpected reserved word 'enum' (1:0)" }