diff --git a/acorn.js b/acorn.js index 979b9317de..c6341b605e 100644 --- a/acorn.js +++ b/acorn.js @@ -1269,7 +1269,7 @@ function readWord() { var word = readWord1(); var type = _name; - if (!containsEsc && isKeyword(word)) + if ((options.ecmaVersion >= 6 || !containsEsc) && isKeyword(word)) type = keywordTypes[word]; return finishToken(type, word); }