fix use strict parsing

This commit is contained in:
Sebastian McKenzie 2015-07-14 17:14:32 +01:00
parent e294b76a06
commit eb8d7e679e

View File

@ -10,7 +10,7 @@ const pp = Parser.prototype;
pp.isUseStrict = function (stmt) {
return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" &&
stmt.expression.type === "Literal" && stmt.expression.value === "use strict";
stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict";
};
// Predicate that tests whether the next token is of the given