From edbf5d33dcb1e60be0598326733ffcc2569f5c32 Mon Sep 17 00:00:00 2001 From: Gidi Meir Morris Date: Wed, 22 Nov 2017 21:31:03 +0000 Subject: [PATCH] Fix "Better error messaging for unexpected tokens #6715" (#6875) --- .../babel-cli/test/fixtures/babel/stdin --filename/stderr.txt | 2 +- .../test/fixtures/transformation/errors/syntax/options.json | 2 +- packages/babylon/src/parser/statement.js | 2 +- packages/babylon/src/parser/util.js | 2 +- packages/babylon/src/plugins/flow.js | 2 +- .../babylon/test/fixtures/core/uncategorised/378/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/388/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/389/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/392/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/393/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/394/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/396/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/405/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/406/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/407/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/408/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/415/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/416/options.json | 2 +- .../babylon/test/fixtures/core/uncategorised/458/options.json | 2 +- .../fixtures/es2015/arrow-functions/no-binary-left/options.json | 2 +- .../test/fixtures/es2015/arrow-functions/no-callee/options.json | 2 +- .../es2015/arrow-functions/no-ternary-test/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/109/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/201/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/205/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/209/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/210/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/214/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/215/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/224/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/225/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/235/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/236/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/255/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/261/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/265/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/266/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/267/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/268/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/277/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/278/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/283/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/340/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/341/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/342/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/386/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/387/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/389/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/390/options.json | 2 +- .../babylon/test/fixtures/es2015/uncategorised/96/options.json | 2 +- .../test/fixtures/es2015/yield/in-class-heritage/options.json | 2 +- .../test/fixtures/es2015/yield/in-global-scope/options.json | 2 +- .../test/fixtures/es2015/yield/in-plain-function/options.json | 2 +- .../options.json | 2 +- .../test/fixtures/es2017/async-functions/10/options.json | 2 +- .../babylon/test/fixtures/es2017/async-functions/4/options.json | 2 +- .../babylon/test/fixtures/es2017/async-functions/5/options.json | 2 +- .../babylon/test/fixtures/es2017/async-functions/6/options.json | 2 +- .../babylon/test/fixtures/es2017/async-functions/9/options.json | 2 +- .../fixtures/es2017/async-functions/export-async/options.json | 2 +- .../with-default-catch-param-fail/options.json | 2 +- .../arrow-rest-forgetting-comma/options.json | 2 +- .../es2015-arrow-function/arrow-with-multiple-rest/options.json | 2 +- .../invalid-export-default/options.json | 2 +- .../esprima/es2015-for-of/invalid-const-init/options.json | 2 +- .../esprima/es2015-for-of/invalid-let-init/options.json | 2 +- .../esprima/es2015-for-of/invalid-var-init/options.json | 2 +- .../generator-method-with-invalid-computed-name/options.json | 2 +- .../invalid-import-default/options.json | 2 +- .../invalid-import-specifiers/options.json | 2 +- .../es2015-lexical-declaration/invalid_const_forin/options.json | 2 +- .../es2015-lexical-declaration/invalid_let_forin/options.json | 2 +- .../esprima/es2015-template-literals/after-switch/options.json | 2 +- .../unclosed-interpolation/options.json | 2 +- .../es2015-template-literals/unclosed-nested/options.json | 2 +- .../es2015-yield/invalid-yield-binding-property/options.json | 2 +- .../esprima/es2015-yield/invalid-yield-expression/options.json | 2 +- .../invalid-yield-generator-member-expression/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0015/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0020/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0021/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0025/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0026/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0028/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0060/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0071/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0072/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0076/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0077/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0078/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0080/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0081/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0083/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0084/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0102/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0112/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0113/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0114/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0115/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0123/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0124/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0135/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0175/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0257/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0258/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0260/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0264/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0265/options.json | 2 +- .../fixtures/esprima/invalid-syntax/migrated_0267/options.json | 2 +- .../async-generators/for-await-async-context/options.json | 2 +- .../class-private-properties/asi-failure-generator/options.json | 2 +- .../class-properties/asi-failure-computed/options.json | 2 +- .../class-properties/asi-failure-generator/options.json | 2 +- .../fixtures/experimental/dynamic-import/no-plugin/options.json | 2 +- .../export-extensions/default-type-with-flow/options.json | 2 +- .../function-sent/disabled-inside-function/options.json | 2 +- .../enabled-function-keyword-declaration/options.json | 2 +- .../enabled-function-keyword-expression/options.json | 2 +- .../function-sent/enabled-inside-function/options.json | 2 +- .../flow/anonymous-function-no-parens-types/bad_01/options.json | 2 +- .../flow/anonymous-function-no-parens-types/bad_02/options.json | 2 +- .../fixtures/flow/anonymous-function-types/bad_01/options.json | 2 +- .../fixtures/flow/anonymous-function-types/bad_02/options.json | 2 +- .../fixtures/flow/anonymous-function-types/bad_03/options.json | 2 +- .../class-multiple-extends-invalid/options.json | 2 +- .../flow/declare-statements/invalid-literal/options.json | 2 +- .../flow/literal-types/invalid-number-negative/options.json | 2 +- .../fixtures/flow/opaque-type-alias/declare_opaque/options.json | 2 +- .../opaque_declare_export_t_and_st/options.json | 2 +- .../opaque_declare_export_t_no_st/options.json | 2 +- .../flow/opaque-type-alias/opaque_declare_t_and_st/options.json | 2 +- .../flow/opaque-type-alias/opaque_declare_t_no_st/options.json | 2 +- .../flow/opaque-type-alias/opaque_invalid_decl2/options.json | 2 +- .../opaque-type-alias/opaque_subtype_allow_export/options.json | 2 +- .../opaque-type-alias/opaque_type_allow_export/options.json | 2 +- .../babylon/test/fixtures/flow/optional-type/5/options.json | 2 +- packages/babylon/test/fixtures/flow/predicates/4/options.json | 2 +- .../fixtures/flow/regression/issue-321-failing/options.json | 2 +- .../flow/type-parameter-declaration/invalid-getter/options.json | 2 +- .../flow/type-parameter-declaration/invalid-setter/options.json | 2 +- .../test/fixtures/typescript/class/method-readonly/options.json | 2 +- 141 files changed, 141 insertions(+), 141 deletions(-) diff --git a/packages/babel-cli/test/fixtures/babel/stdin --filename/stderr.txt b/packages/babel-cli/test/fixtures/babel/stdin --filename/stderr.txt index 38b7bb91ce..50db27b07b 100644 --- a/packages/babel-cli/test/fixtures/babel/stdin --filename/stderr.txt +++ b/packages/babel-cli/test/fixtures/babel/stdin --filename/stderr.txt @@ -1 +1 @@ -SyntaxError: test.js: Unexpected token, expected ; (2:10) +SyntaxError: test.js: Unexpected token, expected ";" (2:10) diff --git a/packages/babel-core/test/fixtures/transformation/errors/syntax/options.json b/packages/babel-core/test/fixtures/transformation/errors/syntax/options.json index b6814bef5f..0a96acde2e 100644 --- a/packages/babel-core/test/fixtures/transformation/errors/syntax/options.json +++ b/packages/babel-core/test/fixtures/transformation/errors/syntax/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (2:10)" + "throws": "Unexpected token, expected \";\" (2:10)" } diff --git a/packages/babylon/src/parser/statement.js b/packages/babylon/src/parser/statement.js index d655345099..40651b83d3 100644 --- a/packages/babylon/src/parser/statement.js +++ b/packages/babylon/src/parser/statement.js @@ -1361,7 +1361,7 @@ export default class StatementParser extends ExpressionParser { // export async; if (next.type !== tt._function) { - this.unexpected(next.start, "Unexpected token, expected function"); + this.unexpected(next.start, `Unexpected token, expected "function"`); } } diff --git a/packages/babylon/src/parser/util.js b/packages/babylon/src/parser/util.js index 7828e5fbdc..c89e40bd8f 100644 --- a/packages/babylon/src/parser/util.js +++ b/packages/babylon/src/parser/util.js @@ -110,7 +110,7 @@ export default class UtilParser extends Tokenizer { messageOrType: string | TokenType = "Unexpected token", ): empty { if (typeof messageOrType !== "string") { - messageOrType = `Unexpected token, expected ${messageOrType.label}`; + messageOrType = `Unexpected token, expected "${messageOrType.label}"`; } throw this.raise(pos != null ? pos : this.state.start, messageOrType); } diff --git a/packages/babylon/src/plugins/flow.js b/packages/babylon/src/plugins/flow.js index ac5dd5fe59..69c48e981d 100644 --- a/packages/babylon/src/plugins/flow.js +++ b/packages/babylon/src/plugins/flow.js @@ -1059,7 +1059,7 @@ export default (superClass: Class): Class => if (this.state.value === "-") { this.next(); if (!this.match(tt.num)) { - this.unexpected(null, "Unexpected token, expected number"); + this.unexpected(null, `Unexpected token, expected "number"`); } return this.parseLiteral( diff --git a/packages/babylon/test/fixtures/core/uncategorised/378/options.json b/packages/babylon/test/fixtures/core/uncategorised/378/options.json index 7108735927..8fe90f7e2f 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/378/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/378/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:9)" + "throws": "Unexpected token, expected \",\" (1:9)" } diff --git a/packages/babylon/test/fixtures/core/uncategorised/388/options.json b/packages/babylon/test/fixtures/core/uncategorised/388/options.json index ba6c2c68ee..6588607606 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/388/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/388/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:6)" + "throws": "Unexpected token, expected \";\" (1:6)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/389/options.json b/packages/babylon/test/fixtures/core/uncategorised/389/options.json index ba6c2c68ee..6588607606 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/389/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/389/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:6)" + "throws": "Unexpected token, expected \";\" (1:6)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/392/options.json b/packages/babylon/test/fixtures/core/uncategorised/392/options.json index dc6c506c56..99a2bc92f2 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/392/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/392/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:12)" + "throws": "Unexpected token, expected \",\" (1:12)" } diff --git a/packages/babylon/test/fixtures/core/uncategorised/393/options.json b/packages/babylon/test/fixtures/core/uncategorised/393/options.json index 45be50db28..568538c149 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/393/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/393/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:16)" + "throws": "Unexpected token, expected \",\" (1:16)" } diff --git a/packages/babylon/test/fixtures/core/uncategorised/394/options.json b/packages/babylon/test/fixtures/core/uncategorised/394/options.json index b4fa97e066..c5749f7ae7 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/394/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/394/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:13)" + "throws": "Unexpected token, expected \",\" (1:13)" } diff --git a/packages/babylon/test/fixtures/core/uncategorised/396/options.json b/packages/babylon/test/fixtures/core/uncategorised/396/options.json index 250152cb4a..570ef651fb 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/396/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/396/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ) (1:18)" + "throws": "Unexpected token, expected \")\" (1:18)" } diff --git a/packages/babylon/test/fixtures/core/uncategorised/405/options.json b/packages/babylon/test/fixtures/core/uncategorised/405/options.json index 3044657f4d..ff1ac8247e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/405/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/405/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:2)" + "throws": "Unexpected token, expected \";\" (1:2)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/406/options.json b/packages/babylon/test/fixtures/core/uncategorised/406/options.json index 2dba4c2a3f..f301e32455 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/406/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/406/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (1:2)" + "throws": "Unexpected token, expected \"(\" (1:2)" } diff --git a/packages/babylon/test/fixtures/core/uncategorised/407/options.json b/packages/babylon/test/fixtures/core/uncategorised/407/options.json index 3044657f4d..ff1ac8247e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/407/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/407/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:2)" + "throws": "Unexpected token, expected \";\" (1:2)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/408/options.json b/packages/babylon/test/fixtures/core/uncategorised/408/options.json index 3044657f4d..ff1ac8247e 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/408/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/408/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:2)" + "throws": "Unexpected token, expected \";\" (1:2)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/core/uncategorised/415/options.json b/packages/babylon/test/fixtures/core/uncategorised/415/options.json index 8d1350f444..a717ca0fa7 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/415/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/415/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:15)" + "throws": "Unexpected token, expected \";\" (1:15)" } diff --git a/packages/babylon/test/fixtures/core/uncategorised/416/options.json b/packages/babylon/test/fixtures/core/uncategorised/416/options.json index 111afcd69d..6079f56395 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/416/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/416/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:14)" + "throws": "Unexpected token, expected \";\" (1:14)" } diff --git a/packages/babylon/test/fixtures/core/uncategorised/458/options.json b/packages/babylon/test/fixtures/core/uncategorised/458/options.json index 6537cfcefe..c0fd072025 100644 --- a/packages/babylon/test/fixtures/core/uncategorised/458/options.json +++ b/packages/babylon/test/fixtures/core/uncategorised/458/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected while (1:9)" + "throws": "Unexpected token, expected \"while\" (1:9)" } diff --git a/packages/babylon/test/fixtures/es2015/arrow-functions/no-binary-left/options.json b/packages/babylon/test/fixtures/es2015/arrow-functions/no-binary-left/options.json index a904da48cb..410ecd16fd 100644 --- a/packages/babylon/test/fixtures/es2015/arrow-functions/no-binary-left/options.json +++ b/packages/babylon/test/fixtures/es2015/arrow-functions/no-binary-left/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:9)" + "throws": "Unexpected token, expected \";\" (1:9)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/arrow-functions/no-callee/options.json b/packages/babylon/test/fixtures/es2015/arrow-functions/no-callee/options.json index 1288082ab0..cf30cd9156 100644 --- a/packages/babylon/test/fixtures/es2015/arrow-functions/no-callee/options.json +++ b/packages/babylon/test/fixtures/es2015/arrow-functions/no-callee/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:8)" + "throws": "Unexpected token, expected \";\" (1:8)" } diff --git a/packages/babylon/test/fixtures/es2015/arrow-functions/no-ternary-test/options.json b/packages/babylon/test/fixtures/es2015/arrow-functions/no-ternary-test/options.json index a904da48cb..410ecd16fd 100644 --- a/packages/babylon/test/fixtures/es2015/arrow-functions/no-ternary-test/options.json +++ b/packages/babylon/test/fixtures/es2015/arrow-functions/no-ternary-test/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:9)" + "throws": "Unexpected token, expected \";\" (1:9)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/109/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/109/options.json index 78b5260e46..715f71e32a 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/109/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/109/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:16)" + "throws": "Unexpected token, expected \";\" (1:16)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/201/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/201/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/201/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/201/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/205/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/205/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/205/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/205/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/209/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/209/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/209/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/209/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/210/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/210/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/210/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/210/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/214/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/214/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/214/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/214/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/215/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/215/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/215/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/215/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/224/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/224/options.json index 2ba5b13372..626e94c744 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/224/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/224/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (2:4)" + "throws": "Unexpected token, expected \";\" (2:4)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/225/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/225/options.json index 8495a77815..236c59f885 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/225/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/225/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (2:6)" + "throws": "Unexpected token, expected \";\" (2:6)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/235/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/235/options.json index 78b5260e46..715f71e32a 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/235/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/235/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:16)" + "throws": "Unexpected token, expected \";\" (1:16)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/236/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/236/options.json index 78b5260e46..715f71e32a 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/236/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/236/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:16)" + "throws": "Unexpected token, expected \";\" (1:16)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/255/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/255/options.json index 54ccd45c8e..6aced8028b 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/255/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/255/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ] (1:9)" + "throws": "Unexpected token, expected \"]\" (1:9)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/261/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/261/options.json index 8cdb36e2c9..76d8ce781e 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/261/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/261/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (1:17)" + "throws": "Unexpected token, expected \"(\" (1:17)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/265/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/265/options.json index 9eb092a66e..35490782f9 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/265/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/265/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (1:7)" + "throws": "Unexpected token, expected \"(\" (1:7)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/266/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/266/options.json index c73cd9d2d3..92ccb389f6 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/266/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/266/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected } (1:18)" + "throws": "Unexpected token, expected \"}\" (1:18)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/267/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/267/options.json index bc0f5f279a..30d037cf73 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/267/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/267/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected } (1:11)" + "throws": "Unexpected token, expected \"}\" (1:11)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/268/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/268/options.json index ad9ebae1d3..7dd76934bf 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/268/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/268/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:13)" + "throws": "Unexpected token, expected \"{\" (1:13)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/277/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/277/options.json index 250152cb4a..570ef651fb 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/277/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/277/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ) (1:18)" + "throws": "Unexpected token, expected \")\" (1:18)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/278/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/278/options.json index c6f6873705..b3fcb06db0 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/278/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/278/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ) (1:19)" + "throws": "Unexpected token, expected \")\" (1:19)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/283/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/283/options.json index acb6f5594c..2da83bcd6f 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/283/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/283/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ) (1:5)" + "throws": "Unexpected token, expected \")\" (1:5)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/340/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/340/options.json index d38440a945..78ef8d2246 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/340/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/340/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:15)" + "throws": "Unexpected token, expected \"{\" (1:15)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/341/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/341/options.json index 62c2636574..327ebb0b4f 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/341/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/341/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:19)" + "throws": "Unexpected token, expected \"{\" (1:19)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/342/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/342/options.json index a511d2a1e5..7fc68d9650 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/342/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/342/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:22)" + "throws": "Unexpected token, expected \"{\" (1:22)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/386/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/386/options.json index 29139e4969..0d6f8c0674 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/386/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/386/options.json @@ -1,5 +1,5 @@ { "sourceType": "module", - "throws": "Unexpected token, expected { (1:7)" + "throws": "Unexpected token, expected \"{\" (1:7)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/387/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/387/options.json index c09368b80c..9b76c337e1 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/387/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/387/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "Unexpected token, expected { (1:7)" + "throws": "Unexpected token, expected \"{\" (1:7)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/389/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/389/options.json index c09368b80c..9b76c337e1 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/389/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/389/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "Unexpected token, expected { (1:7)" + "throws": "Unexpected token, expected \"{\" (1:7)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/390/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/390/options.json index c09368b80c..9b76c337e1 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/390/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/390/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "Unexpected token, expected { (1:7)" + "throws": "Unexpected token, expected \"{\" (1:7)" } diff --git a/packages/babylon/test/fixtures/es2015/uncategorised/96/options.json b/packages/babylon/test/fixtures/es2015/uncategorised/96/options.json index c09368b80c..9b76c337e1 100644 --- a/packages/babylon/test/fixtures/es2015/uncategorised/96/options.json +++ b/packages/babylon/test/fixtures/es2015/uncategorised/96/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "Unexpected token, expected { (1:7)" + "throws": "Unexpected token, expected \"{\" (1:7)" } diff --git a/packages/babylon/test/fixtures/es2015/yield/in-class-heritage/options.json b/packages/babylon/test/fixtures/es2015/yield/in-class-heritage/options.json index a511d2a1e5..7fc68d9650 100644 --- a/packages/babylon/test/fixtures/es2015/yield/in-class-heritage/options.json +++ b/packages/babylon/test/fixtures/es2015/yield/in-class-heritage/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:22)" + "throws": "Unexpected token, expected \"{\" (1:22)" } diff --git a/packages/babylon/test/fixtures/es2015/yield/in-global-scope/options.json b/packages/babylon/test/fixtures/es2015/yield/in-global-scope/options.json index ba6c2c68ee..6588607606 100644 --- a/packages/babylon/test/fixtures/es2015/yield/in-global-scope/options.json +++ b/packages/babylon/test/fixtures/es2015/yield/in-global-scope/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:6)" + "throws": "Unexpected token, expected \";\" (1:6)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/yield/in-plain-function/options.json b/packages/babylon/test/fixtures/es2015/yield/in-plain-function/options.json index fce556fdca..84b618af52 100644 --- a/packages/babylon/test/fixtures/es2015/yield/in-plain-function/options.json +++ b/packages/babylon/test/fixtures/es2015/yield/in-plain-function/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:21)" + "throws": "Unexpected token, expected \";\" (1:21)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/yield/parameter-name-arrow-no-parens-inside-generator/options.json b/packages/babylon/test/fixtures/es2015/yield/parameter-name-arrow-no-parens-inside-generator/options.json index 7e3689b6c6..e999fe365f 100644 --- a/packages/babylon/test/fixtures/es2015/yield/parameter-name-arrow-no-parens-inside-generator/options.json +++ b/packages/babylon/test/fixtures/es2015/yield/parameter-name-arrow-no-parens-inside-generator/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (2:8)" + "throws": "Unexpected token, expected \";\" (2:8)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/10/options.json b/packages/babylon/test/fixtures/es2017/async-functions/10/options.json index 4fbed8c376..cd6a9c1b1a 100644 --- a/packages/babylon/test/fixtures/es2017/async-functions/10/options.json +++ b/packages/babylon/test/fixtures/es2017/async-functions/10/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (2:4)" + "throws": "Unexpected token, expected \";\" (2:4)" } diff --git a/packages/babylon/test/fixtures/es2017/async-functions/4/options.json b/packages/babylon/test/fixtures/es2017/async-functions/4/options.json index 609492567c..ed4720029e 100644 --- a/packages/babylon/test/fixtures/es2017/async-functions/4/options.json +++ b/packages/babylon/test/fixtures/es2017/async-functions/4/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (1:11)" + "throws": "Unexpected token, expected \"(\" (1:11)" } diff --git a/packages/babylon/test/fixtures/es2017/async-functions/5/options.json b/packages/babylon/test/fixtures/es2017/async-functions/5/options.json index 021ac49e5f..740fdb6f2f 100644 --- a/packages/babylon/test/fixtures/es2017/async-functions/5/options.json +++ b/packages/babylon/test/fixtures/es2017/async-functions/5/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (1:10)" + "throws": "Unexpected token, expected \"(\" (1:10)" } diff --git a/packages/babylon/test/fixtures/es2017/async-functions/6/options.json b/packages/babylon/test/fixtures/es2017/async-functions/6/options.json index 111afcd69d..6079f56395 100644 --- a/packages/babylon/test/fixtures/es2017/async-functions/6/options.json +++ b/packages/babylon/test/fixtures/es2017/async-functions/6/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:14)" + "throws": "Unexpected token, expected \";\" (1:14)" } diff --git a/packages/babylon/test/fixtures/es2017/async-functions/9/options.json b/packages/babylon/test/fixtures/es2017/async-functions/9/options.json index 62e1e03ac5..ff9c4d1990 100644 --- a/packages/babylon/test/fixtures/es2017/async-functions/9/options.json +++ b/packages/babylon/test/fixtures/es2017/async-functions/9/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:30)" + "throws": "Unexpected token, expected \";\" (1:30)" } diff --git a/packages/babylon/test/fixtures/es2017/async-functions/export-async/options.json b/packages/babylon/test/fixtures/es2017/async-functions/export-async/options.json index c1f7fc9e8b..8c70964e8c 100644 --- a/packages/babylon/test/fixtures/es2017/async-functions/export-async/options.json +++ b/packages/babylon/test/fixtures/es2017/async-functions/export-async/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "Unexpected token, expected function (1:12)" + "throws": "Unexpected token, expected \"function\" (1:12)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/options.json b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/options.json index c6f6873705..b3fcb06db0 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ) (1:19)" + "throws": "Unexpected token, expected \")\" (1:19)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/options.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/options.json index dcb6ad70e7..e24c4dce39 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:3)" + "throws": "Unexpected token, expected \",\" (1:3)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json index acb6f5594c..2da83bcd6f 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ) (1:5)" + "throws": "Unexpected token, expected \")\" (1:5)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json index 940e0cf2e3..d73f4a2bec 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:20)" + "throws": "Unexpected token, expected \";\" (1:20)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-const-init/options.json b/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-const-init/options.json index e20a42a75d..85e8252d6f 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-const-init/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-const-init/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:17)" + "throws": "Unexpected token, expected \";\" (1:17)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-let-init/options.json b/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-let-init/options.json index 8d1350f444..a717ca0fa7 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-let-init/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-let-init/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:15)" + "throws": "Unexpected token, expected \";\" (1:15)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json b/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json index 8d1350f444..a717ca0fa7 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-for-of/invalid-var-init/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:15)" + "throws": "Unexpected token, expected \";\" (1:15)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/options.json b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/options.json index 8930d32c83..6432f12987 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ] (1:11)" + "throws": "Unexpected token, expected \"]\" (1:11)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/options.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/options.json index 0f60871dea..f2ecbd9741 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:7)" + "throws": "Unexpected token, expected \"{\" (1:7)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/options.json b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/options.json index 36098f8d76..79f7e5730a 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:12)" + "throws": "Unexpected token, expected \"{\" (1:12)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/options.json b/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/options.json index e20a42a75d..85e8252d6f 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:17)" + "throws": "Unexpected token, expected \";\" (1:17)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/options.json b/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/options.json index 8d1350f444..a717ca0fa7 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:15)" + "throws": "Unexpected token, expected \";\" (1:15)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-template-literals/after-switch/options.json b/packages/babylon/test/fixtures/esprima/es2015-template-literals/after-switch/options.json index 9eb092a66e..35490782f9 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-template-literals/after-switch/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-template-literals/after-switch/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (1:7)" + "throws": "Unexpected token, expected \"(\" (1:7)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/options.json b/packages/babylon/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/options.json index bc0f5f279a..30d037cf73 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected } (1:11)" + "throws": "Unexpected token, expected \"}\" (1:11)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-template-literals/unclosed-nested/options.json b/packages/babylon/test/fixtures/esprima/es2015-template-literals/unclosed-nested/options.json index c73cd9d2d3..92ccb389f6 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-template-literals/unclosed-nested/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-template-literals/unclosed-nested/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected } (1:18)" + "throws": "Unexpected token, expected \"}\" (1:18)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/options.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/options.json index 83778687af..279de78fda 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:18)" + "throws": "Unexpected token, expected \",\" (1:18)" } diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-expression/options.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-expression/options.json index 940e0cf2e3..d73f4a2bec 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-expression/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-expression/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:20)" + "throws": "Unexpected token, expected \";\" (1:20)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/options.json b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/options.json index cff9bee079..870f2ec57d 100644 --- a/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/options.json +++ b/packages/babylon/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:28)" + "throws": "Unexpected token, expected \";\" (1:28)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0015/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0015/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0015/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0015/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0020/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0020/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0020/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0020/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0021/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0021/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0021/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0021/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0025/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0025/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0025/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0025/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0026/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0026/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0026/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0026/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0028/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0028/options.json index 478be58865..f313a1ab44 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0028/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0028/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:3)" + "throws": "Unexpected token, expected \";\" (1:3)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0060/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0060/options.json index 7108735927..8fe90f7e2f 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0060/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0060/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:9)" + "throws": "Unexpected token, expected \",\" (1:9)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0071/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0071/options.json index ba6c2c68ee..6588607606 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0071/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0071/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:6)" + "throws": "Unexpected token, expected \";\" (1:6)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0072/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0072/options.json index ba6c2c68ee..6588607606 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0072/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0072/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:6)" + "throws": "Unexpected token, expected \";\" (1:6)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0076/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0076/options.json index dc6c506c56..99a2bc92f2 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0076/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0076/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:12)" + "throws": "Unexpected token, expected \",\" (1:12)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0077/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0077/options.json index 45be50db28..568538c149 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0077/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0077/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:16)" + "throws": "Unexpected token, expected \",\" (1:16)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0078/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0078/options.json index b4fa97e066..c5749f7ae7 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0078/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0078/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:13)" + "throws": "Unexpected token, expected \",\" (1:13)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0080/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0080/options.json index 7a950670cf..1fe9cef7ba 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0080/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0080/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ] (1:4)" + "throws": "Unexpected token, expected \"]\" (1:4)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0081/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0081/options.json index 1232a70433..cd9f7961a2 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0081/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0081/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ] (1:7)" + "throws": "Unexpected token, expected \"]\" (1:7)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0083/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0083/options.json index 2d4f18af3e..c911f691f4 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0083/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0083/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:5)" + "throws": "Unexpected token, expected \",\" (1:5)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0084/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0084/options.json index 2d4f18af3e..c911f691f4 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0084/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0084/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:5)" + "throws": "Unexpected token, expected \",\" (1:5)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0102/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0102/options.json index c267d0d030..2a714dba18 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0102/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0102/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:7)" + "throws": "Unexpected token, expected \",\" (1:7)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json index 3044657f4d..ff1ac8247e 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:2)" + "throws": "Unexpected token, expected \";\" (1:2)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0113/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0113/options.json index 2dba4c2a3f..f301e32455 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0113/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0113/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (1:2)" + "throws": "Unexpected token, expected \"(\" (1:2)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json index 3044657f4d..ff1ac8247e 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:2)" + "throws": "Unexpected token, expected \";\" (1:2)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0115/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0115/options.json index 3044657f4d..ff1ac8247e 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0115/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0115/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:2)" + "throws": "Unexpected token, expected \";\" (1:2)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0123/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0123/options.json index 8d1350f444..a717ca0fa7 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0123/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0123/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:15)" + "throws": "Unexpected token, expected \";\" (1:15)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0124/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0124/options.json index 111afcd69d..6079f56395 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0124/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0124/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:14)" + "throws": "Unexpected token, expected \";\" (1:14)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0135/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0135/options.json index 22648899c2..16e9980c3e 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0135/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0135/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ) (1:20)" + "throws": "Unexpected token, expected \")\" (1:20)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0175/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0175/options.json index 6537cfcefe..c0fd072025 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0175/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0175/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected while (1:9)" + "throws": "Unexpected token, expected \"while\" (1:9)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0257/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0257/options.json index c86ee6ab79..7250ca6848 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0257/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0257/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:16)" + "throws": "Unexpected token, expected \";\" (1:16)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json index 250152cb4a..570ef651fb 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ) (1:18)" + "throws": "Unexpected token, expected \")\" (1:18)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0260/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0260/options.json index a7e78a5f32..968d57e8fe 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0260/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0260/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ) (1:16)" + "throws": "Unexpected token, expected \")\" (1:16)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0264/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0264/options.json index 86a28b44d5..4c3967ee55 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0264/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0264/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:18)" + "throws": "Unexpected token, expected \"{\" (1:18)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0265/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0265/options.json index 0f60871dea..f2ecbd9741 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0265/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0265/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:7)" + "throws": "Unexpected token, expected \"{\" (1:7)" } diff --git a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0267/options.json b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0267/options.json index 0f60871dea..f2ecbd9741 100644 --- a/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0267/options.json +++ b/packages/babylon/test/fixtures/esprima/invalid-syntax/migrated_0267/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:7)" + "throws": "Unexpected token, expected \"{\" (1:7)" } diff --git a/packages/babylon/test/fixtures/experimental/async-generators/for-await-async-context/options.json b/packages/babylon/test/fixtures/experimental/async-generators/for-await-async-context/options.json index be297ea04d..f396669f35 100644 --- a/packages/babylon/test/fixtures/experimental/async-generators/for-await-async-context/options.json +++ b/packages/babylon/test/fixtures/experimental/async-generators/for-await-async-context/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (2:6)" + "throws": "Unexpected token, expected \"(\" (2:6)" } diff --git a/packages/babylon/test/fixtures/experimental/class-private-properties/asi-failure-generator/options.json b/packages/babylon/test/fixtures/experimental/class-private-properties/asi-failure-generator/options.json index f2e29e91e0..b30a668734 100644 --- a/packages/babylon/test/fixtures/experimental/class-private-properties/asi-failure-generator/options.json +++ b/packages/babylon/test/fixtures/experimental/class-private-properties/asi-failure-generator/options.json @@ -1,4 +1,4 @@ { - "throws": "Unexpected token, expected ; (3:8)", + "throws": "Unexpected token, expected \";\" (3:8)", "plugins": ["classPrivateProperties"] } diff --git a/packages/babylon/test/fixtures/experimental/class-properties/asi-failure-computed/options.json b/packages/babylon/test/fixtures/experimental/class-properties/asi-failure-computed/options.json index 3d6afa3a38..add4733dab 100644 --- a/packages/babylon/test/fixtures/experimental/class-properties/asi-failure-computed/options.json +++ b/packages/babylon/test/fixtures/experimental/class-properties/asi-failure-computed/options.json @@ -1,4 +1,4 @@ { - "throws": "Unexpected token, expected ; (3:9)", + "throws": "Unexpected token, expected \";\" (3:9)", "plugins": ["classProperties"] } diff --git a/packages/babylon/test/fixtures/experimental/class-properties/asi-failure-generator/options.json b/packages/babylon/test/fixtures/experimental/class-properties/asi-failure-generator/options.json index 32897f69b1..075e6cdf9d 100644 --- a/packages/babylon/test/fixtures/experimental/class-properties/asi-failure-generator/options.json +++ b/packages/babylon/test/fixtures/experimental/class-properties/asi-failure-generator/options.json @@ -1,4 +1,4 @@ { - "throws": "Unexpected token, expected ; (3:8)", + "throws": "Unexpected token, expected \";\" (3:8)", "plugins": ["classProperties"] } diff --git a/packages/babylon/test/fixtures/experimental/dynamic-import/no-plugin/options.json b/packages/babylon/test/fixtures/experimental/dynamic-import/no-plugin/options.json index 8bebf4639c..8e0810d0d8 100644 --- a/packages/babylon/test/fixtures/experimental/dynamic-import/no-plugin/options.json +++ b/packages/babylon/test/fixtures/experimental/dynamic-import/no-plugin/options.json @@ -1,4 +1,4 @@ { - "throws": "Unexpected token, expected { (1:6)", + "throws": "Unexpected token, expected \"{\" (1:6)", "plugins": [] } diff --git a/packages/babylon/test/fixtures/experimental/export-extensions/default-type-with-flow/options.json b/packages/babylon/test/fixtures/experimental/export-extensions/default-type-with-flow/options.json index 3d735abd0a..5b39a87bce 100644 --- a/packages/babylon/test/fixtures/experimental/export-extensions/default-type-with-flow/options.json +++ b/packages/babylon/test/fixtures/experimental/export-extensions/default-type-with-flow/options.json @@ -1,5 +1,5 @@ { "plugins": ["exportExtensions", "flow"], "sourceType": "module", - "throws": "Unexpected token, expected = (1:17)" + "throws": "Unexpected token, expected \"=\" (1:17)" } diff --git a/packages/babylon/test/fixtures/experimental/function-sent/disabled-inside-function/options.json b/packages/babylon/test/fixtures/experimental/function-sent/disabled-inside-function/options.json index 6127ef0bfb..105f760209 100644 --- a/packages/babylon/test/fixtures/experimental/function-sent/disabled-inside-function/options.json +++ b/packages/babylon/test/fixtures/experimental/function-sent/disabled-inside-function/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (2:17)" + "throws": "Unexpected token, expected \"(\" (2:17)" } diff --git a/packages/babylon/test/fixtures/experimental/function-sent/enabled-function-keyword-declaration/options.json b/packages/babylon/test/fixtures/experimental/function-sent/enabled-function-keyword-declaration/options.json index 79cf105e1e..c35c6b64ea 100644 --- a/packages/babylon/test/fixtures/experimental/function-sent/enabled-function-keyword-declaration/options.json +++ b/packages/babylon/test/fixtures/experimental/function-sent/enabled-function-keyword-declaration/options.json @@ -1,4 +1,4 @@ { "plugins": ["functionSent"], - "throws": "Unexpected token, expected ; (2:18)" + "throws": "Unexpected token, expected \";\" (2:18)" } diff --git a/packages/babylon/test/fixtures/experimental/function-sent/enabled-function-keyword-expression/options.json b/packages/babylon/test/fixtures/experimental/function-sent/enabled-function-keyword-expression/options.json index bb5304a475..bd8b0f0d3c 100644 --- a/packages/babylon/test/fixtures/experimental/function-sent/enabled-function-keyword-expression/options.json +++ b/packages/babylon/test/fixtures/experimental/function-sent/enabled-function-keyword-expression/options.json @@ -1,4 +1,4 @@ { "plugins": ["functionSent"], - "throws": "Unexpected token, expected , (2:19)" + "throws": "Unexpected token, expected \",\" (2:19)" } diff --git a/packages/babylon/test/fixtures/experimental/function-sent/enabled-inside-function/options.json b/packages/babylon/test/fixtures/experimental/function-sent/enabled-inside-function/options.json index 003224f7e0..937bff8e5b 100644 --- a/packages/babylon/test/fixtures/experimental/function-sent/enabled-inside-function/options.json +++ b/packages/babylon/test/fixtures/experimental/function-sent/enabled-inside-function/options.json @@ -1,4 +1,4 @@ { "plugins": ["functionSent"], - "throws": "Unexpected token, expected ( (2:17)" + "throws": "Unexpected token, expected \"(\" (2:17)" } diff --git a/packages/babylon/test/fixtures/flow/anonymous-function-no-parens-types/bad_01/options.json b/packages/babylon/test/fixtures/flow/anonymous-function-no-parens-types/bad_01/options.json index 2f68c0372c..bdbbf5a8ee 100644 --- a/packages/babylon/test/fixtures/flow/anonymous-function-no-parens-types/bad_01/options.json +++ b/packages/babylon/test/fixtures/flow/anonymous-function-no-parens-types/bad_01/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:27)" + "throws": "Unexpected token, expected \";\" (1:27)" } diff --git a/packages/babylon/test/fixtures/flow/anonymous-function-no-parens-types/bad_02/options.json b/packages/babylon/test/fixtures/flow/anonymous-function-no-parens-types/bad_02/options.json index 52a8725a65..e49fcc05ad 100644 --- a/packages/babylon/test/fixtures/flow/anonymous-function-no-parens-types/bad_02/options.json +++ b/packages/babylon/test/fixtures/flow/anonymous-function-no-parens-types/bad_02/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:36)" + "throws": "Unexpected token, expected \";\" (1:36)" } diff --git a/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_01/options.json b/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_01/options.json index 7dcae78ae3..afeae0c7e8 100644 --- a/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_01/options.json +++ b/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_01/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:29)" + "throws": "Unexpected token, expected \";\" (1:29)" } diff --git a/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_02/options.json b/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_02/options.json index 1e8c905871..4e633917c4 100644 --- a/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_02/options.json +++ b/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_02/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:38)" + "throws": "Unexpected token, expected \";\" (1:38)" } diff --git a/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_03/options.json b/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_03/options.json index 62e1e03ac5..ff9c4d1990 100644 --- a/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_03/options.json +++ b/packages/babylon/test/fixtures/flow/anonymous-function-types/bad_03/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:30)" + "throws": "Unexpected token, expected \";\" (1:30)" } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/class-multiple-extends-invalid/options.json b/packages/babylon/test/fixtures/flow/declare-statements/class-multiple-extends-invalid/options.json index 1814e460c8..22fd395994 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/class-multiple-extends-invalid/options.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/class-multiple-extends-invalid/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected { (1:25)" + "throws": "Unexpected token, expected \"{\" (1:25)" } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/invalid-literal/options.json b/packages/babylon/test/fixtures/flow/declare-statements/invalid-literal/options.json index 1288082ab0..cf30cd9156 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/invalid-literal/options.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/invalid-literal/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:8)" + "throws": "Unexpected token, expected \";\" (1:8)" } diff --git a/packages/babylon/test/fixtures/flow/literal-types/invalid-number-negative/options.json b/packages/babylon/test/fixtures/flow/literal-types/invalid-number-negative/options.json index 47910828b1..5667a8ffb0 100644 --- a/packages/babylon/test/fixtures/flow/literal-types/invalid-number-negative/options.json +++ b/packages/babylon/test/fixtures/flow/literal-types/invalid-number-negative/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected number (1:8)" + "throws": "Unexpected token, expected \"number\" (1:8)" } diff --git a/packages/babylon/test/fixtures/flow/opaque-type-alias/declare_opaque/options.json b/packages/babylon/test/fixtures/flow/opaque-type-alias/declare_opaque/options.json index bdd84a6c76..c6a890932c 100644 --- a/packages/babylon/test/fixtures/flow/opaque-type-alias/declare_opaque/options.json +++ b/packages/babylon/test/fixtures/flow/opaque-type-alias/declare_opaque/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:23)" + "throws": "Unexpected token, expected \";\" (1:23)" } diff --git a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_export_t_and_st/options.json b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_export_t_and_st/options.json index 52a8725a65..e49fcc05ad 100644 --- a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_export_t_and_st/options.json +++ b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_export_t_and_st/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:36)" + "throws": "Unexpected token, expected \";\" (1:36)" } diff --git a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_export_t_no_st/options.json b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_export_t_no_st/options.json index b883a989ae..1cd92c2a1f 100644 --- a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_export_t_no_st/options.json +++ b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_export_t_no_st/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:31)" + "throws": "Unexpected token, expected \";\" (1:31)" } diff --git a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_t_and_st/options.json b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_t_and_st/options.json index 7dcae78ae3..afeae0c7e8 100644 --- a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_t_and_st/options.json +++ b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_t_and_st/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:29)" + "throws": "Unexpected token, expected \";\" (1:29)" } diff --git a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_t_no_st/options.json b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_t_no_st/options.json index bfe4fdd7c7..b8eb9b6900 100644 --- a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_t_no_st/options.json +++ b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_declare_t_no_st/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:24)" + "throws": "Unexpected token, expected \";\" (1:24)" } diff --git a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_invalid_decl2/options.json b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_invalid_decl2/options.json index 62e1e03ac5..ff9c4d1990 100644 --- a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_invalid_decl2/options.json +++ b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_invalid_decl2/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:30)" + "throws": "Unexpected token, expected \";\" (1:30)" } diff --git a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_subtype_allow_export/options.json b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_subtype_allow_export/options.json index a36cfb32c5..96f24ac821 100644 --- a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_subtype_allow_export/options.json +++ b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_subtype_allow_export/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (2:44)" + "throws": "Unexpected token, expected \";\" (2:44)" } diff --git a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_type_allow_export/options.json b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_type_allow_export/options.json index 6612fb253c..aa195086ef 100644 --- a/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_type_allow_export/options.json +++ b/packages/babylon/test/fixtures/flow/opaque-type-alias/opaque_type_allow_export/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (2:36)" + "throws": "Unexpected token, expected \";\" (2:36)" } diff --git a/packages/babylon/test/fixtures/flow/optional-type/5/options.json b/packages/babylon/test/fixtures/flow/optional-type/5/options.json index 4ec7dabecb..d477858fb4 100644 --- a/packages/babylon/test/fixtures/flow/optional-type/5/options.json +++ b/packages/babylon/test/fixtures/flow/optional-type/5/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:65)" + "throws": "Unexpected token, expected \",\" (1:65)" } diff --git a/packages/babylon/test/fixtures/flow/predicates/4/options.json b/packages/babylon/test/fixtures/flow/predicates/4/options.json index 69dd7eb745..cec83fa54f 100644 --- a/packages/babylon/test/fixtures/flow/predicates/4/options.json +++ b/packages/babylon/test/fixtures/flow/predicates/4/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (1:18)" + "throws": "Unexpected token, expected \";\" (1:18)" } diff --git a/packages/babylon/test/fixtures/flow/regression/issue-321-failing/options.json b/packages/babylon/test/fixtures/flow/regression/issue-321-failing/options.json index 78ffeb9294..8590a79d7c 100644 --- a/packages/babylon/test/fixtures/flow/regression/issue-321-failing/options.json +++ b/packages/babylon/test/fixtures/flow/regression/issue-321-failing/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected , (1:27)" + "throws": "Unexpected token, expected \",\" (1:27)" } diff --git a/packages/babylon/test/fixtures/flow/type-parameter-declaration/invalid-getter/options.json b/packages/babylon/test/fixtures/flow/type-parameter-declaration/invalid-getter/options.json index 0685750310..fee1459767 100644 --- a/packages/babylon/test/fixtures/flow/type-parameter-declaration/invalid-getter/options.json +++ b/packages/babylon/test/fixtures/flow/type-parameter-declaration/invalid-getter/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (2:10)" + "throws": "Unexpected token, expected \"(\" (2:10)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/type-parameter-declaration/invalid-setter/options.json b/packages/babylon/test/fixtures/flow/type-parameter-declaration/invalid-setter/options.json index 0685750310..fee1459767 100644 --- a/packages/babylon/test/fixtures/flow/type-parameter-declaration/invalid-setter/options.json +++ b/packages/babylon/test/fixtures/flow/type-parameter-declaration/invalid-setter/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ( (2:10)" + "throws": "Unexpected token, expected \"(\" (2:10)" } \ No newline at end of file diff --git a/packages/babylon/test/fixtures/typescript/class/method-readonly/options.json b/packages/babylon/test/fixtures/typescript/class/method-readonly/options.json index 897764181d..f7dd2e27ef 100644 --- a/packages/babylon/test/fixtures/typescript/class/method-readonly/options.json +++ b/packages/babylon/test/fixtures/typescript/class/method-readonly/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected ; (2:14)" + "throws": "Unexpected token, expected \";\" (2:14)" }