diff --git a/src/parser/expression.js b/src/parser/expression.js index eacb276665..55fa1619f4 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -396,7 +396,7 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { node = this.startNode(); this.next(); if (!this.match(tt.parenL)) { - this.unexpected(); + this.unexpected(null, tt.parenL); } return this.finishNode(node, "Import"); diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json index 19754505ae..3044657f4d 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0112/options.json @@ -1,3 +1,3 @@ { "throws": "Unexpected token, expected ; (1:2)" -} +} \ No newline at end of file diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json index 19754505ae..3044657f4d 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0114/options.json @@ -1,3 +1,3 @@ { "throws": "Unexpected token, expected ; (1:2)" -} +} \ No newline at end of file diff --git a/test/fixtures/experimental/dynamic-import/direct-calls-only/options.json b/test/fixtures/experimental/dynamic-import/direct-calls-only/options.json index 7592dd7f0e..400eeea626 100644 --- a/test/fixtures/experimental/dynamic-import/direct-calls-only/options.json +++ b/test/fixtures/experimental/dynamic-import/direct-calls-only/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (2:15)" + "throws": "Unexpected token, expected ( (2:15)" }