diff --git a/acorn.js b/acorn.js index df16c19886..3476392618 100644 --- a/acorn.js +++ b/acorn.js @@ -2043,7 +2043,7 @@ // next token is a colon and the expression was a simple // Identifier node, we switch to interpreting it as a label. default: - if (tokType === _name && tokVal === "async") { + if (options.ecmaVersion >= 7 && tokType === _name && tokVal === "async") { var id = parseIdent(); if (tokType === _function) { next(); diff --git a/package.json b/package.json index f7e89739c3..bded093ed5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "acorn-6to5", "description": "Acorn fork used by 6to5", "main": "acorn.js", - "version": "0.11.1-2", + "version": "0.11.1-3", "maintainers": [ { "name": "Marijn Haverbeke",